10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
My UNIX system is SUN Solaris.
I am trying to do a simple thing as described below.
I have a PIPE delimited file that has header and trailer. So the file is something like below:
Test1.txt looks like something below:
field_data1|field_data2|and some more data --Header
... (5 Replies)
Discussion started by: Saanvi1
5 Replies
2. Shell Programming and Scripting
Hi All,
I am trying write a simple command using AWK and SED to this but without any success.
Here is what I am using:
head -1 test1.txt>test2.txt|sed '1d;$d' test1.txt|awk '{print substr($0,0,(length($0)-2))}' >>test2.txt|tail -1 test1.txt>>test2.txt
Input:
Header
1234567
abcdefgh... (2 Replies)
Discussion started by: nvuradi
2 Replies
3. Shell Programming and Scripting
How can we a shell script and pass date parameters .I have 3 files comming from Datastage with |" delimited
I need append 3 files as above: File1:
P0000|"47416954|"AU|"000|"INS|"0000|"|"20060601|"99991231|"|"|"|"|"01
File 2:... (2 Replies)
Discussion started by: e1994264
2 Replies
4. Shell Programming and Scripting
i have .DAT file FILE1.DAT
1200910270040625
2123456789 J123456 ABC
2123456789 K123456 ABC
2222222222 L123456 DEF
2333333333 M12345 GHI
30000004
My outfile FILE2.TXT should have like this, I need the header value as ie (1200910270040625 ) body rows remove the duplicate rows and the... (2 Replies)
Discussion started by: kshuser
2 Replies
5. Shell Programming and Scripting
Situation:
Our system currently executes a job (COBOL Program) that generates an interface file to be sent to one of our vendors. Because this system processes information for over 100,000 employees/retirees (and growing), we'd like to multi-thread the job into processing-groups in order to... (4 Replies)
Discussion started by: oordonez
4 Replies
6. UNIX for Dummies Questions & Answers
Hi everyone,
I am new to Unix programming. My inquries is:-
a) How to add a Header and Trailer in the set of data
b) Include a number count of the data in the trailer
The set of data only contained the information of 'Customer's Name' and 'Account Number'. I would like to add the Header... (2 Replies)
Discussion started by: balzzz
2 Replies
7. UNIX for Dummies Questions & Answers
I need to concatenate about a thousand files (using a loop) on a UNIX server. Also, each file has a header row which is to be removed. Which of the following would give better performance?
tail+2 <filename> or sed '1,1d' <filename>
Or is there another, faster way?
Thanks,
Kaus (4 Replies)
Discussion started by: kausmone
4 Replies
8. UNIX for Dummies Questions & Answers
All,
I am new to unix and i have the following requirement.
I have file(s) landing into input directory with timestamp, first i want to copy all these files into seperate directory then i want to rename these files without timestamp and also remove header,trailer from that file..
Could... (35 Replies)
Discussion started by: ksrams
35 Replies
9. Shell Programming and Scripting
I have a flat file and need to count no of records in the file less the header and the trailer record.
I would appreciate any and all asistance
Thanks
Hadi Lalani (2 Replies)
Discussion started by: guiguy
2 Replies
10. Shell Programming and Scripting
Hi,
I need some help in removing the header (first line) and the trailer (last line) in a give file...
The data file actually comes in EBCDIC format and I converted it into ASCII..
Now I need to strip off the first line and the last line..
I think we can use sed to do something like this:... (2 Replies)
Discussion started by: madhunk
2 Replies