10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I would like to write a /bin/ksh script to manipulate a file and compare its contexts. Comparing lines 1 & 2, 3 & 4, 5 & 6, and so forth until the end of the file. This is what I would like the script to compare (using line 1 & 2 as an example):
1. Verify if the last column in line 1 is... (10 Replies)
Discussion started by: seekryts15
10 Replies
2. UNIX for Dummies Questions & Answers
Hello all- New to this forum, and relatively new to using grep at the Terminal command line to work with regular expressions. I've got a background in math and some programming experience, so it's not been too difficult to learn the basics of searching through my word lists for particular types of... (13 Replies)
Discussion started by: dtalvacchio
13 Replies
3. Shell Programming and Scripting
Hello I'm having a little difficulty in writing a shell script for a few simple tasks.
First I have two files "file1.txt" and "file2.txt" and I want to read and compare the last line of each file. The files look like this.
File1.txt
File2.txt
After comparing the two lines I would... (2 Replies)
Discussion started by: RustikGaming
2 Replies
4. UNIX for Dummies Questions & Answers
Total UNIX Rookie, but I'm learning. I have columns of integer data separated by spaces, and I'm using a Mac terminal.
What I want to do:
1. Compare "line 1 column 2" (x) to "line 2 column 2" (y); is y-x>=100?
2. If yes, display difference and y's line number
3. If no, increment x and y by... (9 Replies)
Discussion started by: markymarkg123
9 Replies
5. UNIX for Dummies Questions & Answers
Hello all,
I always found help for my problems using the search option, but this time my request is too specific. I have two files that I want to compare. File1 is the index and File2 contains the data:
File1:
chr1 protein_coding exon 500 600 . + . gene_id "20532";... (0 Replies)
Discussion started by: DerSeb
0 Replies
6. Shell Programming and Scripting
i have 2 files and i want to compare
i currently cat the files and awk print $1, $2 and doing if file1=file2 then fail, else exit 0
what i want to do is compare values, with column 1 being a reference i want to compare line by line and then still be able to do if then statement to see if worked... (1 Reply)
Discussion started by: sigh2010
1 Replies
7. Shell Programming and Scripting
Hello All,
I am writting file comparison Utility and I have encountered such a senario where there are 2 files such as follows-
1#!/usr/local/bin/python
2 import gsd.scripts.admin.control.gsdPageEscalate
3.gsd.scripts.admin.control.gsdPageEscalate.main()
1 #!/usr/local/bin/python... (10 Replies)
Discussion started by: Veenak15
10 Replies
8. Shell Programming and Scripting
Hi,
I have 2 files
file1
********
01-05-09|java.xls|
02-05-08|c.txt|
08-01-09|perl.txt|
01-01-09|oracle.txt|
********
file2
********
01-02-09|windows.xls|
02-05-08|c.txt|
01-05-09|java.xls|
08-02-09|perl.txt|
01-01-09|oracle.txt|
******** (8 Replies)
Discussion started by: shekhar_v4
8 Replies
9. Shell Programming and Scripting
Hi All,
I am a newbie to Shell scripting. Please help me with the Following problem,
1. I have two files with the same name in different locations in the same machine.
Eg: /root/testfolder/a ---- location 1
/tmp/testfolder/a ----- location 2
2. I want to compare the files in... (5 Replies)
Discussion started by: Karthick333031
5 Replies
10. Shell Programming and Scripting
Hi Friends,
I have 2 files A and B . I want to compare the 3rd line of file A and B .
(I dont want to compare the 2 files, using diff or cmp). I just want to know whether 3rd line of A matches the 3 rd line of B. Can anybody share their knowledge on the same?
Thanks ,
Vijaya (12 Replies)
Discussion started by: vijaya2006
12 Replies