10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the awk below I am trying to copy the entire contents of $6 there may be multiple values seperated by a ;, to $8, if $8 is . (lines 1 and 3 are examples). If that condition $8 is not . (line2 is an example) then that line is skipped and printed as is. The awk does execute but prints the output... (3 Replies)
Discussion started by: cmccabe
3 Replies
2. Shell Programming and Scripting
I am trying to use the two files shown below to either remove or rename contents in one of those files. If in file1.txt $5 matches $5 of file2.txt and the value in $1 of file1.txt is not "No Match" then that value is substituted for all values in $5 and $1 of file2.txt. If however in $1 ... (5 Replies)
Discussion started by: cmccabe
5 Replies
3. Shell Programming and Scripting
Hi
I have 2 files
1.del
----
1,2,3,4,5
1,2,3,4,4
1,1,1,1,2
2.del
----
1,2,3,4,5
1,
1,2,3,4,4
1,1,1,1,2
I need to compare the above two files in unix, as in the output should only tell the difference in contents as I should get only the line
1 ( from 2.del) , rest all lines are... (4 Replies)
Discussion started by: Ethen561
4 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I have a file with tab delimited columns like:
File1
A 2 C R
F 4 D Q
C 9 A B
......
I want to grep out the lines in a second file, File2, corresponding to each line in File1
Can I do this:
while read a b c d
do
grep '$a\t$b\t$c\t$d' File2 >>... (2 Replies)
Discussion started by: Gussifinknottle
2 Replies
5. Shell Programming and Scripting
Input file
9.99331e-13
8.98451e-65
9.98418e-34
7.98319e-08
365592
111669
74942.9
0
Desired output
365592
111669
74942.9
7.98319e-08
1.99331e-13
6.98418e-34 (2 Replies)
Discussion started by: perl_beginner
2 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I have two files as shown below:
test1
678
679
689
690
710
test2
1 678
654 800
676 791
689 900
I want to get a count of lines from test2 whose columns bound the values in test1
I tried running the code below; however am getting wrong results. (3 Replies)
Discussion started by: Gussifinknottle
3 Replies
7. Shell Programming and Scripting
I want a script that will move everything beyond a certain line number or beyond a certain content word into another file.
For example, if file A has this:
first line
second line
third line
forth line
fifth line
sixth line
I want to run a script that will move everything beyond the third... (4 Replies)
Discussion started by: robp2175
4 Replies
8. Shell Programming and Scripting
So, this issue is driving me nuts! I was hoping to get a lending hand here...
I have 2 files:
file1.txt contains:
this is example1
this is example2
this is example3
this is example4
this is example5
file2.txt contains:
example3
example5
Basically, I need a script or command to... (4 Replies)
Discussion started by: bashshadow1979
4 Replies
9. Shell Programming and Scripting
Hi everyone,
Ive got a quick question about the feasibility and any suggestions for a shell script. I can use sh or ksh, doesnt matter. Basically, Ive got an output file from a db2 command that looks like so:
SCHEMA NAME CARD LEAF ELEAF LVLS ISIZE NDEL KEYS F4 F5 ... (3 Replies)
Discussion started by: rdudejr
3 Replies
10. UNIX for Advanced & Expert Users
Hi Experts,
I am working in HP-UX 11.0 workstaion.
How can i make a file to be executed with the corresponding software to be invoked or executed.
as in Windows.
ie., if a file index.html has to be double clicked to invoke the Netscape Navigator.
What i have to do to achieve this... (2 Replies)
Discussion started by: anent
2 Replies