11-08-2005
Thanks for the help. limitation of awk ?
Hi Friend,
This is working fine.
One problem ?
My file size it about 48MB. Is there any limitation of file size in awk utility.
I get a error message as follows,
awk: Input line <SUBBEGIN
MODE=ADDS cannot be longer than 3,000 bytes.
My real file input as follows,
<SUBBEGIN
MODE=ADDSUB;
IMSI=616040200000599;
MSISDN=22993140998;
CAT=COMMON;
CURRENTNAM=NONGPRS;
SMDP=MSC;
KI_USEDFLAG=YES;
TBS=TS11&TS12&TS21&TS22&TS61&TS62&BS21&BS22&BS23&BS24&BS25&BS26&BS31&BS32&BS33&BS34&BS41&BS42&BS43&B S44&BS45&BS46&BS51&BS52&BS53&BS61&BS62&BS81&BS82;
CONTROL=SUB;
PW=0000;
WPA=0;
VLR=22993239000;
MSC=22993239000;
OCSI=0;
TCSI=1;
SSCSI=5;
DEFCALL=TS11;
<SUBEND
<SUBBEGIN
MODE=ADDSUB;
IMSI=616040200000598;
MSISDN=22993140990;
CAT=COMMON;
CURRENTNAM=NONGPRS;
SMDP=MSC;
KI_USEDFLAG=YES;
TBS=TS11&TS12&TS21&TS22&TS61&TS62&BS21&BS22&BS23&BS24&BS25&BS26&BS31&BS32&BS33&BS34&BS41&BS42&BS43&B S44&BS45&BS46&BS51&BS52&BS53&BS61&BS62&BS81&BS82;
CONTROL=SUB;
PW=0000;
WPA=0;
VLR=22993239000;
MSC=22993239000;
OCSI=0;
TCSI=1;
SSCSI=5;
DEFCALL=TS11;
<SUBEND
<SUBBEGIN
Can u give me a suggestion. ?
Thanks,
Mahesh
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
:) Hi
i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error
Function i used it as
$ iconv -f UTF8 -t ANSI filename
Error iam getting is NOT Supported UTF8 to ANSI
please some help me out on this.........Let me... (1 Reply)
Discussion started by: rajreddy
1 Replies
2. UNIX for Dummies Questions & Answers
:confused: Hi
i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error
Function i used it as
$ iconv -f UTF8 -t ANSI filename
Error iam getting is NOT Supported UTF8 to ANSI
please some help me out on... (9 Replies)
Discussion started by: rajreddy
9 Replies
3. Shell Programming and Scripting
CSV---- fixed length fiile format
Can any suggest a mechanism for converting a CSV to fixedlength,the file is expected to be of size 50000lines,
:mad:
CSV file contains address feilds of variable length (17 Replies)
Discussion started by: anumkoshy
17 Replies
4. UNIX for Dummies Questions & Answers
Hi
I have a file which has ascii , binary, binary decimal coded,decimal & hexadecimal data with lot of special characters (like öƒ.ƒ.„İİ¡Š·œƒ.„İİ¡Š· ) in it. I want to standardize the file into ASCII format & later use that as source .
Can any one suggest a way a logic to convert such... (5 Replies)
Discussion started by: gaur.deepti
5 Replies
5. Shell Programming and Scripting
I have a file named "suspected" with series of line like these :
{'protocol': 17, 'service': 'BitTorrent KRPC', 'server': '219.78.120.166', 'client_port': 52044, 'client': '10.64.68.44', 'server_port': 8291, 'time': 1226506312L, 'serverhostname': ''}
{'protocol': 17, 'service': 'BitTorrent... (3 Replies)
Discussion started by: rk4k
3 Replies
6. Shell Programming and Scripting
I have a comma delimited log file which has the date as MM/DD/YY in the 2nd column, and HH:MM:SS in the 3rd column.
I need to change the date format to YYYY-MM-DD and merge it with the the time HH:MM:SS. How will I got about this?
Sample input
02/27/09,23:52:31
02/27/09,23:52:52... (3 Replies)
Discussion started by: hazno
3 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
Is there any way to convert a file which is in UNIX format to a PC format....
Flip command can be used , apart form this command can we have any other way.... like usinf "awk" etc ..... main purpose of not using flip is that my Kshell doesnot support this comamnd.... (1 Reply)
Discussion started by: Samtel
1 Replies
8. Shell Programming and Scripting
Hi All,
Is there any way to convert a file which is in UNIX format to a PC format....
Flip command can be used , apart form this command can we have any other way.... like usinf "awk" etc ..... main purpose of not using flip is that my Kshell doesnot support this comamnd.... (2 Replies)
Discussion started by: Samtel
2 Replies
9. Shell Programming and Scripting
Hi ,
i want to change this question, i will post soon.. (6 Replies)
Discussion started by: srikanth2567
6 Replies
10. Shell Programming and Scripting
Can anyone provide me a unix script to convert file formats. Input and desired output is attached. (10 Replies)
Discussion started by: Ravi S M
10 Replies
LEARN ABOUT FREEBSD
stdbuf
STDBUF(1) BSD General Commands Manual STDBUF(1)
NAME
stdbuf -- change standard streams initial buffering
SYNOPSIS
stdbuf [-e bufdef] [-i bufdef] [-o bufdef] [command [...]]
DESCRIPTION
stdbuf is used to change the initial buffering of standard input, standard output and/or standard error streams for command. It relies on
libstdbuf(3) which is loaded and configured by stdbuf through environment variables.
The options are as follows:
-e bufdef
Set initial buffering of the standard error stream for command as defined by bufdef (see BUFFER DEFINITION).
-i bufdef
Set initial buffering of the standard input stream for command as defined by bufdef (see BUFFER DEFINITION).
-o bufdef
Set initial buffering of the standard output stream for command as defined by bufdef (see BUFFER DEFINITION).
BUFFER DEFINITION
Buffer definition is the same as in libstdbuf(3):
"0" unbuffered
"L" line buffered
"B" fully buffered with the default buffer size
size fully buffered with a buffer of size bytes (suffixes 'k', 'M' and 'G' are accepted)
EXAMPLES
In the following example, the stdout stream of the awk(1) command will be fully buffered by default because it does not refer to a terminal.
stdbuf is used to force it to be line-buffered so vmstat(8)'s output will not stall until the full buffer fills.
# vmstat 1 | stdbuf -o L awk '$2 > 1 || $3 > 1' | cat -n
SEE ALSO
libstdbuf(3), setvbuf(3)
HISTORY
The stdbuf utility first appeared in FreeBSD 8.4.
AUTHORS
The original idea of the stdbuf command comes from Padraig Brady who implemented it in the GNU coreutils. Jeremie Le Hen implemented it on
FreeBSD.
BSD
April 28, 2012 BSD