10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
I have a XML file which is looks like as below. <<please see the attachment >>
<?xml version="1.0" encoding="UTF-8"?>
... (4 Replies)
Discussion started by: Rajeev_hbk
3. UNIX for Dummies Questions & Answers
Hi, i have a file like this:
I want to remove the lines "***no hit*** and their above line to get an output file like this: (11 Replies)
Discussion started by: the_simpsons
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
5. Shell Programming and Scripting
I have to search a word in a text file and then I have to delete lines above from the word searched . For eg suppose the file is like this:
abc:324234 (2 Replies)
Discussion started by: vsachan
6. Shell Programming and Scripting
Please help me with this problem if you have a solution.
I have two files:
<file1> : In each line, first word is an Id and then other words that belong to this Id
piMN-1 abc pqr xyz py12
niLM y12 FY4 pqs
fiRLym F12 kite red
<file2> : same as file1, but can have extra lds... (3 Replies)
Discussion started by: mira
7. 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
8. Shell Programming and Scripting
Hi all, I am trying to write a command that can help me count the number of lines in the /etc/passwd file ending in bash.
I have read through other threads but am yet to find one indicating how to locate a specifc word at the end of a line. I know i will need to use the wc command but when i... (8 Replies)
Discussion started by: warlock129
9. Shell Programming and Scripting
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?
Vijaya (12 Replies)
Discussion started by: vijaya2006
10. Shell Programming and Scripting
I need to compare the contents of 2 directories where the file contents are similar and take out the filenames whose contents does not exist within the 2 directories.
Does anyone has a script which can do this?
At the end of... (6 Replies)
Discussion started by: manualvin