If I understand your question correctly, you just want to be left with a the list of rows that need to be added to file1 in order to make it identical to file2, and you don't care about the actual position of these rows within the output (as you want to remove the 15a, 11a, etc...)?
If so, pass the output through sed
This assumes that you all operations are "appends" (if not, modify the second sed expression to account for it), and that you don't want the rows containing just a "dot" (these are produced because of the -e option to diff which produces an "ed" script)....
If this doesn't help, please post sections of the two input files, and state exactly what results you are expecting to achieve (i.e. what exactly are you attempting to do?).
Thanks for your response, that's exactly what i am looking for
But i was just wondering, if i want the output in the actual position of these row within the output file, what is the code like? for instant, i want to get rid of those lines with 1a2,3, 4a7, 7a11, 10a15 and the ">" in front of the line.
I'm trying to find out what happened to the rogue game that apt-get told me it installed, so I thought I would find the file. I went to the root and entered:
find -name "rog*.*"
I get a large number of lines saying my access is denied in various directories. I figure I'll practice my Unix... (14 Replies)
Hi,
I have to redirect output of the command "perldoc perllocal" to new file which
contains all the perl module installed.
Currently using
perldoc perllocal >> mod_data
This does not contain all perl modules installed locally on machine, and each character is doubled.
Please... (3 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
I have two directories Dir_A and Dir_A_Arc. Need help with a shell script.
The shell script needs to take the path to these two directories as parameters $1 and $2.
The script needs to check if any files exist in these directories and if either of the directories are empty then exit... (5 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hi,
I am trying to get the system RAM size from "top" command's output by the following but it is not working.
top | sed "s/^Mem.**\(*\), *//" (10 Replies)
Hi All,
I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations:
1. I am restrained to 2 input files only.
2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Hi All,
I am running my application on a dual cpu debian linux 3.0 (2.4.19 kernel).
For my application:
<sar -U ALL>
CPU %user %nice %system %idle
...
10:58:04 0 153.10 0.00 38.76 0.00
10:58:04 1 3.88 0.00 4.26 ... (0 Replies)
Hello,
Can anyone let me know what is the maximum file size that can be given as input for the "Diff" Command in Unix?
I have a file size as large as 28MB and which can also increase. Will I face any issues with such a file size. If yes, What is the other alternative.
Thanks in advance for... (1 Reply)