10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Guys ,
I have two files say a1 and a2 having following contents
a1
dag
wfd
a2
dag
wfd
chire
hcm
I want to delete only the lines in a2 which are in a1 and final output of a2 should be
a2
chire
hcm (6 Replies)
Discussion started by: Pradeep_1990
6 Replies
2. Shell Programming and Scripting
two files: one with the line number only, and the 2nd one with line number and content, as following:
line_file.txt
1
3
5
9
23
30
content_file.txt
1|we are the world|good|great
2|easily do this by highlighting you|easily do this by highlighting you|easily do this by highlighting... (2 Replies)
Discussion started by: dtdt
2 Replies
3. Shell Programming and Scripting
hi Gurus,
I have a source file with more than 10 columns ( not fixed )
I want to delete all the lines on the following condition
1) where i have first column as "UPDATE PLAN ADD RATE SCHEDULE" and fourth column as null
awk '($1=="UPDATE PLAN ADD RATE SCHEDULE" && $4=="") {print $0}'... (5 Replies)
Discussion started by: r_t_1601
5 Replies
4. Shell Programming and Scripting
Hi all,
I have a question for the Gurus. I apologize if this has bee shared before but I couldn't find the link.
I am trying to read parameters from an external parameter file. What I m trying to achieve is read selected lines from an external parameter file into the script. for eg my param... (4 Replies)
Discussion started by: maverick1947
4 Replies
5. Shell Programming and Scripting
I am trying to print 1st, 2nd, 13th and 14th fields of a file of line numbers from 29 to 10029. I dont know how to put this in one code. Currently I am removing the selected lines by
awk 'NR==29,NR==10029' File1 > File2
and then doing
awk '{print $1, $2, $13, $14}' File2 > File3
Can... (3 Replies)
Discussion started by: ananyob
3 Replies
6. Shell Programming and Scripting
I have an if statement where I state that if there are more than one records (lines) found containing a string in a file, then it enters into a while loop to use each line for as many lines as there are and then stop.
Trouble is, I can't figure out how to move to the next instance of each line. ... (2 Replies)
Discussion started by: derekphl
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I am looking to copy selected lines from a file using the vim editor. I have looked up a few resources and they have suggested to use this-
Type mk
Type: "ay'k (double quotes, <register name from a-z>, <y-yank single quote, k
You can paste those lines wherever you want with "ap
I tried... (7 Replies)
Discussion started by: coolavi
7 Replies
8. Shell Programming and Scripting
Hi,
I would like a shell script that reads all files in a directory and concatenate them. It is not a simple concatenation. The first few lines of the files should not be included. The lines to be included are the lines from where 'START HERE' appears up to the end of the file. For example, I... (4 Replies)
Discussion started by: laiko
4 Replies
9. UNIX for Dummies Questions & Answers
How can I extract few lines(like 10 to 15, top 10 and last 10) from a file using perl.
I do it with sed, head and tail in unix scripting. I am new to perl. Appreciate your help. (2 Replies)
Discussion started by: paruthiveeran
2 Replies
10. Shell Programming and Scripting
Hi everybody:
I try to print in new file selected lines from another file wich depends on the first column.
I have done a script like this:
lines=( "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "21" "31" "41" "51" "55" "57" "58" )
${lines}
for lines in ${lines}
do
awk -v ... (6 Replies)
Discussion started by: tonet
6 Replies