10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello Guys
I need to read and compare two file, one file contains hostname, and others contain hostname and IP@,
and the objective is to read each file and compare if line in file1 equal to first word in the second file2
file1
file2
this is my first code
fqdn_hosts=list.txt... (2 Replies)
Discussion started by: Abdellah
2 Replies
2. Shell Programming and Scripting
file2 content
f1file2 content
f1,1,2,3,4,5
f1,2,4,6,8,10
f10,1,2,3,4,5
f10,2,4,6,8,10
f5,1,2,3,4,5
f5,2,4,6,8,10awk 'FNR==NR{a;next}; !($1 in a)' file2 file1output
f10,1,2,3,4,5
f10,2,4,6,8,10
f5,1,2,3,4,5
f5,2,4,6,8,10awk 'FNR==NR{a;next}; ($1 in a)' file2 file1output
nothing... (4 Replies)
Discussion started by: gksenthilkumar
4 Replies
3. Shell Programming and Scripting
I have a file which has following content:
NAME=ora.DG1.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE
NAME=ora.DG2.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE
NAME=ora.DG3.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE
NAME=ora.DG4.dg... (7 Replies)
Discussion started by: rcc50886
7 Replies
4. UNIX for Dummies Questions & Answers
Hello All,
i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file.
Any inputs are appreciated
... (3 Replies)
Discussion started by: victor.s
3 Replies
5. Shell Programming and Scripting
could someone write a short script which is able to take a text file input and compare lines 1 and 2, 3 and 4, 5 and 6 ... ... until the end of the file. And to prompt if the lines are not equal.
Thank you! (10 Replies)
Discussion started by: c_lady
10 Replies
6. Shell Programming and Scripting
Hi ,
I have a CSV file ( file.csv) with some data as
below:
A,1,abc,x,y,z,,xyz,20100101,99991231
A,1,abc,x,y,z,234,xyz,20100101,99991231
I have to delete the duplicate line based on
unique identifiers which are values in the
fields- 2,3,4,8.These coulmns in both the rows
have same... (6 Replies)
Discussion started by: Sheel
6 Replies
7. Shell Programming and Scripting
i want a shell script to read the a list of numbers from a file and compare with a unique number with the list.
FOR EXAMPLE :
abc.lst file contains d following
2343
3214
45654
563456
5436
Unique number is 2342 (6 Replies)
Discussion started by: pgmfourms
6 Replies
8. Shell Programming and Scripting
Hi, I want to compare the last two lines of a files, specifically characters 32 - 50 in both lines and generate an exit code if the range of characters do not match. Please advise. Thanks in advance! (2 Replies)
Discussion started by: limshady411
2 Replies
9. Shell Programming and Scripting
hi
how can i read a file using the unix script and check for one or more field value for a predefined status/value
for example : the file contains the following text
Name IP Address/Mask Type Connection Status
mgmt-eth0(1) ... (2 Replies)
Discussion started by: aemunathan
2 Replies
10. Shell Programming and Scripting
Hello,
I am newcomer and sorry for this simple question. I want to how to compare two lines in a file? For example, to compare the first line and the second line of a file to know if they are same?
Thanks in advance!
Leon (3 Replies)
Discussion started by: sabertooth2000
3 Replies