10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Forum.
I have the following script that splits a large fixed-width file into smaller multiple fixed-width files based on input segment type.
The main command in the script is:
awk -v search_col_pos=$search_col_pos -v search_str_len=$search_str_len -v segment_type="$segment_type"... (8 Replies)
Discussion started by: pchang
8 Replies
2. Shell Programming and Scripting
All,
I used to use following command to replace specific location in a fixed width file.
Recently looks like my command stopped working as intended. We are on AIX unix.
awk 'function repl(s,f,t,v)
{ return substr(s,1,f-1) sprintf("%-*s", t-f+1, v) substr(s,t+1) }
NR<=10 {... (3 Replies)
Discussion started by: pinnacle
3 Replies
3. Shell Programming and Scripting
hi,
i have a fixed width file with multiple columns and need to print data using awk command.
i use: awk -F "|" '($5 == BH) {print $1,$2,$3}' <non_AIM target>.txt for a delimiter file.
but now i have a fixed width file like below:
7518 8269511BH 20141224951050N8262
11148 8269511BH... (5 Replies)
Discussion started by: kcdg859
5 Replies
4. Shell Programming and Scripting
Thank u so much .Its working fine as expected.
---------- Post updated at 03:41 PM ---------- Previous update was at 01:46 PM ----------
I need one more help.
I have another file(fixed length) that will get negative value (ex:-00000000003000) in postion (98 - 112) then i have to... (6 Replies)
Discussion started by: vinus
6 Replies
5. Shell Programming and Scripting
Hi,I've a unix pipe delimited file as below f1|f2|f3|f4|f5|f6 My requirement is to pad spaces on the left to fields f2, f3 and f5. Field Lengths according to file layout f2 - 4 char f3 - 5 char f5 - 3 char If my record is as below 1|43|bc|h0|34|a Output record should be as below 1| 43| bc|h0|... (4 Replies)
Discussion started by: Soujanya_K
4 Replies
6. Shell Programming and Scripting
Hi there,
CTL Port IO Rate(IOPS) Read Rate(IOPS) Write Rate(IOPS) Read Hit(%) Write Hit(%) Trans. Rate(MB/S) Read Trans. Rate(MB/S) Write Trans. Rate(MB/S) 09:36:48
0 A 136 0 135 97 100 ... (6 Replies)
Discussion started by: gray380
6 Replies
7. Shell Programming and Scripting
I have to create a single file from three files, Please see below for samples:
day.txt
20090101
20090102
item.txt
123456789101
12345678910209
1234567891
str.txt
1
12
123
output.txt
20090101123456789101 1 0
2009010112345678910209 12 ... (2 Replies)
Discussion started by: tamahomekarasu
2 Replies
8. Shell Programming and Scripting
Source File:
abcdefghijklmnop01qrstuvwxyz
abcdefghijklmnop02qrstuvwxyz
abcdefghijklmnop03qrstuvwxyz
abcdefghijklmnop04qrstuvwxyz
abcdefghijklmnop05qrstuvwxyz
Whatever characters are in 17-18 on each line of the file, it should be concatenated to the same line at the character number... (6 Replies)
Discussion started by: tamahomekarasu
6 Replies
9. Shell Programming and Scripting
Col1 Col2 Col3 Col4
12 Completed 08 0830
12 In Progress 09 0829
11 For F U 07 0828
Considering the file above, how could i replace the third column the most efficient way? The actual file size is almost 1G. I am... (10 Replies)
Discussion started by: tamahomekarasu
10 Replies
10. UNIX for Dummies Questions & Answers
I am using the following command at the Unix prompt to make my 'infile' into a fixed width file of 100 characters.
awk '{printf "%-100s\n",$0}' infile > outfile
However, there are some records with a special character "©"
These records are using 3 characters in place of one and my record... (2 Replies)
Discussion started by: alok.benjwal
2 Replies