10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I have a backup report that unfortunately has some kind of hanging indent thing where the first line contains one column more than the others
I managed to get the output that I wanted using awk, but just wanting to know if there is short way of doing it using the same awk
Below is what... (2 Replies)
Discussion started by: newbie_01
2 Replies
2. Shell Programming and Scripting
Hi,
I have file with thousands of lines somewhat similar to the below 6 lines
06MXXXXXXXXXXXXXXXX 0328 003529 J27300022 MICROSOFT *MSN
06<1 000000001344392 JPN151-85830 MSBILL.INFO F
06<A17087454000328651551 MSBILL.INFO ... (16 Replies)
Discussion started by: dsid
16 Replies
3. Shell Programming and Scripting
Hi! all
can any one tell me how to compare current record of column with next and previous record in awk without using array
my case is like this
input.txt
0 32
1 26
2 27
3 34
4 26
5 25
6 24
9 23
0 32
1 28
2 15
3 26
4 24 (7 Replies)
Discussion started by: Dona Clara
7 Replies
4. Shell Programming and Scripting
Hi ,
I want to remove space from each record in one file My file is like
BUD, BDL
ABC, DDD, ABC
ABC, DDD, DDD, KKK
The o/p should be
BUD,BDL
ABC,DDD,ABC
ABC,DDD,DDD,KKK
Can any one help me regarding this? (9 Replies)
Discussion started by: jagdishrout
9 Replies
5. Shell Programming and Scripting
Hello Everyone,
I want to print out the records after and before a certain record. I am able to figure out how to print that particular record but not the ones before and after. Looking for some advice
Thank you (6 Replies)
Discussion started by: danish0909
6 Replies
6. UNIX for Dummies Questions & Answers
i have a find command piped to an awk script, I'm expecting it printing the matching record one time but it's doing it twice:
the following is my code:
find directoryname | awk 'BEGIN { FS="/" } /.*\.$/ || /.*\.$/ { printf "%s/%s\n", $(NF-1), $NF }
it gave me the correct output, but just... (2 Replies)
Discussion started by: ymc1g11
2 Replies
7. Shell Programming and Scripting
I have a loop like
while read i
do
echo "$i"
.
.
.
done < tms.txt
The tms.txt contians data like
2008-02-03 00:00:00
<space>00:00:00
.
.
.
2010-02-03 10:54:32 (2 Replies)
Discussion started by: machomaddy
2 Replies
8. UNIX for Dummies Questions & Answers
Hi
I have a complex script which outputs a text file for loading into a db.
I now need to enhance this script do that I can issue an ‘lp' command
to show the count of the number of records in this file.
Can anybody give me the necessary syntax ? (2 Replies)
Discussion started by: malts18
2 Replies
9. Shell Programming and Scripting
Hi,
i want to replace comma by space for specified field in record, i mean i want to replace the commas in the 4th field by space. and rest all is same throught the record.
the record is
16458,99,001,"RIMOUSKI, QC",418,"N",7,EST,EDT,902
16458,99,002,"CHANDLER,... (5 Replies)
Discussion started by: raghavendra.cse
5 Replies
10. Shell Programming and Scripting
Calling all experts:
When I ftp from Mainframe to unix server, the ftp message says fixed length 2060, but i lose trailing spaces.
I tried a solution i found here,
awk ' { printf("%-2060s\n",$0) } ' fname1 > fname2
works for small records but, err msg: string too long, for long records
... (1 Reply)
Discussion started by: JohnMario
1 Replies