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 !
I need some help with a script I am writing.
I am trying to compare two files, the first file being in this format :
Header1
Text1-1
Text1-2
Text1-3
Header2
Text2-1
etc...
For each header, I want to check if it appears in the second file, and if it is the case print the header... (4 Replies)
Discussion started by: jbi
4 Replies
4. 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
5. Shell Programming and Scripting
Hello all,
I need to print all the lines before a specific string and print a custom message 2 lines after that.
So far I have managed to print everything up the string, inclusively, but I can't figure out how to print the 2 lines after that and the custom message.
My code thus far is:... (4 Replies)
Discussion started by: SEinT
4 Replies
6. 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
7. Shell Programming and Scripting
friends,
I am running iostat command in linux. Following is the output
iostat -d
Linux 2.6.18-128.el5 (btovm725.ind.hp.com) 04/16/2010
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 21.49 5.32 255.61 2871221 138010414
sda1 ... (8 Replies)
Discussion started by: achak01
8 Replies
8. Shell Programming and Scripting
Hi everyboby
this is my problem
I Have this input
1111;222
222
2;333
3333;4444
111;
22222;33
33;
444
and I need this output
1111;2222222;3333333;4444 (15 Replies)
Discussion started by: agritur
15 Replies
9. Shell Programming and Scripting
Hi,
I have a data file with millions of record (N). Each record was saved in 4 lines. So there are total of NX4 lines in the data file.
For Example:
Host1
a
b
c
d
Host2
e
f
g
h
Host3
i
j
k (2 Replies)
Discussion started by: phoeberunner
2 Replies
10. Shell Programming and Scripting
How to add record separator after certain lines?
I am faicing issue where some lines have result as successive line & some are not having. how can I add record separator after every record
here is example of data I have (line numbers are not present in data):
1. <enabled="true" name="dSuite1"... (7 Replies)
Discussion started by: sach253
7 Replies