10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the awk I am trying to subtract the difference $3-$2 of each matching $4 before the first _ (underscore) and print that value in $13.
I think the awk will do that, but added comments. What I am not sure off is how to add a line or lines that will add sum each matching $13 value and put it in... (2 Replies)
Discussion started by: cmccabe
2 Replies
2. Shell Programming and Scripting
Need help on below req
Compare two files and send difference of file to other file
File2 is static which never changes
ex:
File1
A.txt
B.ttx
C.txt
E.txt
File2
A.txt (6 Replies)
Discussion started by: satish1222
6 Replies
3. Shell Programming and Scripting
Why the below option2 doesn't fetch similar output as option1 ? I am on linux.
$cat test
2013-01-01-00.25.43.643845
Option1:
cat test | gawk -F"-" ' {print $2 " " $3 " " $1}'
01 01 2013
Option2:
cat test | gawk '{FS="-"} {print $2 " " $3 " " $1}'
2013-01-01-00.25.43.643845 (5 Replies)
Discussion started by: Shivdatta
5 Replies
4. Shell Programming and Scripting
Hey everyone,
I have two folders (folder1, folder2). Folder2 is a compiled version of a bunch of other folders including folder1. I want to compare folder1 to folder2 to make sure that folder2 contains all of the contents of folder1. If it does not, I would like the script to output... (5 Replies)
Discussion started by: chango77747
5 Replies
5. Shell Programming and Scripting
It seems like a common task, but I haven't been able to find the solution.
vitallog.txt
1310,John,Hancock
13211,Steven,Mills
122,Jane,Doe
138,Thoms,Doe
1500,Micheal,May
vitalinfo.txt
12122,Jane,Thomas
122,Janes,Does
123,Paul,Kite
**OUTPUT**
vitalfiltered.txt
12122,Jane,Thomas... (2 Replies)
Discussion started by: charles33
2 Replies
6. UNIX for Dummies Questions & Answers
Hello! I'm just learning the shell, and I would really like to know how to do this:
Given these 2 commands:
ls -l
ls -le
How can I, with a one-liner, ask the shell to show me visually in the shell, what the difference is between the output of the two commands? They look the same to me... (6 Replies)
Discussion started by: turbofayce
6 Replies
7. Solaris
HiCan anyone tell me why I am getting a difference in the date format on 2 different Solaris servers?On one I get: -Monday, 9 November 2009 09:02:45 GMTand the other: -Monday November 9 09:03:05 GMT 2009Both servers are running OS Version M-11/16/88iCan anyone tell me why one uses a "," and the... (5 Replies)
Discussion started by: steadyonabix
5 Replies
8. HP-UX
Hi,
Does anyone know why I get a different output when using "netstat -a" or "netstat -an" ??
# netstat -a | grep ts15r135
tcp 0 0 nbsol152.62736 ts15r135.23211 ESTABLISHED
# netstat -an | grep 172.23.160.78
tcp 0 0 135.246.39.152.51954 ... (4 Replies)
Discussion started by: ejdv
4 Replies
9. UNIX for Dummies Questions & Answers
Hi,
Please help me, I have two files. I need to output the difference of contents of each file in another file. For example, I need to know the content of the file1 that does not exist on file2 and vice versa. Please take note that the size of the files are large. How can I do it using unix... (4 Replies)
Discussion started by: ayhanne
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I had two data file (File1, File2), each one just have one column, but two file were very big. File2 is smaller, all its data included in File1. I want to ouput the result which don't have any data in File2. Could any one give me a help on how to do that?
Thanks in advance!
Yun
... (4 Replies)
Discussion started by: yxiao
4 Replies