10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have multi line input(var1) and reference(var2) variables.
How to capture lines not present in var2 but present in var1?
How to capture lines present var2 but not in var1?
# configuration from server
var1="""
Custom JAX-RS
Custom Shared
Web 2.0
"""
# required configuration... (6 Replies)
Discussion started by: kchinnam
6 Replies
2. UNIX for Dummies Questions & Answers
I have a file which gets generated after successful completion of unix job and is in below format like
Account Number Action Taken Balances
19905236 Posted to suspense 52638
The records in file runs in several thousand count . I want to add the... (2 Replies)
Discussion started by: er_raman1986
2 Replies
3. Shell Programming and Scripting
Hi,
I have fileA.txt like this.
B01B02 D0011718
B01B03 D0012540
B01B04 D0006145
B01B05 D0004815
B01B06 D0012069
B01B07 D0004064
B01B08 D0011988
B01B09 D0012071
B01B10 D0005596
B01B11 D0011351
B01B12 D0004814
B01C01 D0011804
I want to compare this against another file (fileB.txt)... (3 Replies)
Discussion started by: genehunter
3 Replies
4. UNIX for Advanced & Expert Users
Hi all
Thanks in advance...........
Please help me for this issue............
I have a file it has 11 records . I used the command like ....
>$ wc -l file
11 file
I'm getting output like 11 file (no.of records along with filename)
here my requirement is, I want to display only... (3 Replies)
Discussion started by: ksrivani
3 Replies
5. Shell Programming and Scripting
I am having 6 files named file1,file2....file6 and i need to append number of lines in each file to begining of the file. For example,
If file 1 contains
a
b
c
d
then after adding new line file1 should contain
4
a
b
c
d
Thanks in advance. (2 Replies)
Discussion started by: akhay_ms
2 Replies
6. UNIX for Dummies Questions & Answers
Hi
I have got two files
File1:
Row1
Row2
Row3
Row4
File2:
Row3
Row4
Now my requirement is search each and every line of file1 in file2 and if the record do not exist in file2 then write that to an output file.
Output file should be as below
Row1
Row2 (4 Replies)
Discussion started by: sbhuvana20
4 Replies
7. Shell Programming and Scripting
I need some help with adding lines to file and substitute a pattern.
Ok I have a file:
#cat names.txt
name: John Doe
stationed: 1
name: Michael Sweets
stationed: 41
.
.
.
And would like to change it to:
name: John Doe
employed
permanently
stationed: 1-office (7 Replies)
Discussion started by: hemo21
7 Replies
8. UNIX for Dummies Questions & Answers
Hey
I have an input file containing a list of numbers like:
U01120.CDS.1
D25328.CDS.1
X15573.CDS.1
K03515.CDS.1
L44140.CDS.10
U24183.CDS.1
M97347.CDS.1
U05259.CDS.1
And another input file containing results created on the basis of the above input:
G6PT_HUMAN U01120.CDS.1 -1.9450 3.1706... (1 Reply)
Discussion started by: Banni
1 Replies
9. Shell Programming and Scripting
From the below file I want to grep only the lines except the comment sections. But grep -v "#" is eliminating the last line because it has one # in between.
Any idea how can I ignore only the lines which have # at the begining (I mean comment lines) ?
Thanks a lot to all in advance
C Saha (1 Reply)
Discussion started by: csaha
1 Replies
10. Shell Programming and Scripting
Is there a standard way to make a shell script read a file, or list, and skip each line that contains # at the begining, or ignores the content starting after a # in line?
I'm looking to mimic the way commenting in a shell script normally works. This way I can comment my text files and lists my... (4 Replies)
Discussion started by: sysera
4 Replies