10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
This seems pretty simple, but I cant figure it out. I get stumped on the simple things.
I am running two commands
1) take a listing a directory of files, and filter out the doc_name (which is in a series of extracted files), and place it in a file.
ls -l | awk '{print $9}' | grep... (5 Replies)
Discussion started by: jeffs42885
5 Replies
2. Shell Programming and Scripting
I am trying to find the differences between the two sorted, tab separated, attached files. Thank you :).
In update2 there are 52,058 lines and in current2 there are 52,197 so 139 differences should result.
However,
awk 'FNR==NR{a;next}!($0 in a)' update2 current2 > out2comm -1 -3... (2 Replies)
Discussion started by: cmccabe
2 Replies
3. Shell Programming and Scripting
Not really sure how to accomplish this. If I have two lists with matching columns. Second column is different. I would like to show the differences plus/minus.
list1
device1 5
decive2 10
decive3 10
device4 10
device5 10
device6 20
list2
device1 10
... (1 Reply)
Discussion started by: mrlayance
1 Replies
4. UNIX for Dummies Questions & Answers
Hi togehter!
I would like to write an awk script which prints the first column divided by the sum of the second column:
So if this is my list
1 2
2 1
3 1
4 1
it should print a list like this:
1/5
2/5
3/5
4/5
My idea was to use END like this: (3 Replies)
Discussion started by: bjoern456
3 Replies
5. Shell Programming and Scripting
Hi,
I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :-
./sample.sh: line... (12 Replies)
Discussion started by: satishmallidi
12 Replies
6. Shell Programming and Scripting
need a one liner to compare 2nd and 3rd field and print values that are not matched in 2nd field
Input
col 2 col 3
1.1.1.1 11.11.11.11
8.8.8.8 0.0.0.0
3.3.3.3 2.2.2.2
7.7.7.7 3.3.3.3
5.5.5.5 1.1.1.1
4.4.4.4
6.6.6.6
9.9.9.9
output
7.7.7.7 ... (12 Replies)
Discussion started by: chidori
12 Replies
7. Shell Programming and Scripting
I have been living with this problem with GNU sed v4.1.4 for a long time, but now I really need to figure it out.
When using a list in either an address or a search, the expression is matching lower and upper-case letters. works as it should.
For example, if I run
sed -nr "// p"... (7 Replies)
Discussion started by: nctrader
7 Replies
8. Shell Programming and Scripting
Hi
Hope you are having a great weeknd !! I had a question and need your expertise for this :
I have 2 files File1 & File2(of same structure) which I need to compare on some columns. I need to find the values which are there in File2 but not in File 1 and put the Differences in another file... (5 Replies)
Discussion started by: newbie_8398
5 Replies
9. Shell Programming and Scripting
File_A contains Strings:
a
b
c
d
File_B contains Strings:
a
c
z
Need to have script written in either sh or ksh. Derive resultant files (File_New_A and File_New_B) from lists File_A and File_B where string elements in File_New_A and File_New_B are listed below.
Resultant... (7 Replies)
Discussion started by: mlv_99
7 Replies
10. Shell Programming and Scripting
Hi,
I've been charged with the task of finding out whether the scripts which we use on our current DYNIX (Sequent) UNIX box will continue to run happily on our soon-to-be-installed Sun Solaris box.
I'm fairly certain that they'll be OK, but I've heard mutterings about awk running differently... (2 Replies)
Discussion started by: pbritta
2 Replies