10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am using Awk in Ubuntu 12.04
First file: I have a file like this:
SNP1 1 198.2
SNP2 1 124.5
SNP3 1 124.4
.
.
.
Second file: I have another file like this:
SNP2
SNP5
SNP10
.
.
.
I want to create a third file like my first file but keeping ONLY the SNPs that... (8 Replies)
Discussion started by: Homa
8 Replies
2. 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
3. Shell Programming and Scripting
I need to extract selected lines from a log file, I can use grep to pull one line matching 'x' or matching 'y', how can I run through the log printing both matching lines in order top to bottom.
i.e
line 1 xyz - not needed
line 2 User01 - needed
line 3 123 - not needed
line 4 Info - needed... (2 Replies)
Discussion started by: rosslm
2 Replies
4. 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
5. Shell Programming and Scripting
We have a server that logs transactions to a file. I want to write a script that will delete the first 50 lines of the file daily without renameing the file or moving the file. (8 Replies)
Discussion started by: daveisme
8 Replies
6. UNIX for Advanced & Expert Users
How I can delete 100 lines anywhere in a file without opening a file and without renaming the file. (11 Replies)
Discussion started by: Nirgude07
11 Replies
7. UNIX for Dummies Questions & Answers
I have a file with 65 sets of 35 coordinates, and would like to isolate these coordinates so that I can easily copy the coordinates to another file. The problem is, I've got a 9 line header before each set of coordinates (so each set is 44 lines long). There are a zillion threads out there about... (3 Replies)
Discussion started by: red baron
3 Replies
8. Shell Programming and Scripting
How do I delete all the lines after the line containing text ***DISCLOSURES*** . I want to delete this line too.
Thank you (2 Replies)
Discussion started by: reachsamir
2 Replies
9. Shell Programming and Scripting
Hi
I have a file & always I need to remove or delete last 2 lines from that file. So in a file if I have 10 lines then it should return me first 8 lines.
Can someone help me? (4 Replies)
Discussion started by: videsh77
4 Replies
10. Shell Programming and Scripting
Hello All,
I have a .csv file and I have to delete the selcted records stored in a vairable
e.g
echo $lname
7 88 91 94 97 100 103 106
I dont know how to pass the variable name to "sed" for deleting the $lname from a file
can any one help as this is very urgent.
$lname is changing the... (3 Replies)
Discussion started by: 009satya
3 Replies