10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I use UBUNTU 12.04.
I want to write a short program using awk to select some lines in a file based on a second file.
My first file has this format with about 400,000 lines and 47 fields:
SNP1 1 12.1
SNP2 1 13.2
SNP3 1 45.2
SNP4 1 23.4
My second file has this format:
SNP3... (1 Reply)
Discussion started by: Homa
2. UNIX for Dummies Questions & Answers
while IFS=: read address port; do
number=`grep "$address" thing.txt -A 1 | grep "addresses=" | cut -d'"' -f2`
echo "$address,$port,$number,$answer" >>... (9 Replies)
Discussion started by: shade917
3. UNIX for Dummies Questions & Answers
if I wanted to know if the word DOG(followed by several random numbers) appears in col 1, how many times will that same word DOG* appeared in col 2? This is a very large file
Thanks! (7 Replies)
Discussion started by: verse123
4. Shell Programming and Scripting
without using conventional file searching commands like find etc, is it possible to locate a file if i just know that the file that i'm searching for contains a particular text like "Hello world" or something? (5 Replies)
Discussion started by: arindamlive
5. Shell Programming and Scripting
I've got a simple log file that looks something like this:
And I need to append it to look like this:
So I just want to add a timestamp and a static (non-variable) word to each line in the file. Is there an easy scripted way to cat the file and append that data to each line....?? (4 Replies)
Discussion started by: kevinmccallum
6. Shell Programming and Scripting
I tried to make the title/subject detailed, but well.. have to keep it short as well.
I am wanting to take a large list of strings, and search through a large list of files to hopefully find numerous matches. I am not sure the quickest way to do this though.
// List of files
file1.txt... (2 Replies)
Discussion started by: Rhije
7. Shell Programming and Scripting
Can any one please suggest the procedure to search a part of line in a very large file in which log entries are entered with very high speed.
i have trued with grep and egrep
grep 'text text text' <file-name>
egrep 'text text text' <file-name>
here 'text text text' is... (4 Replies)
Discussion started by: NIMISH AGARWAL
8. UNIX for Dummies Questions & Answers
I need to search a very large file. 13g in size. i am looking for a record that has a value in the byte 4200 . how can i view the file or how can i search for value in the byte 4200? (1 Reply)
Discussion started by: Wrightman
9. UNIX for Dummies Questions & Answers
I have a text file that I want to search for repeated lines and print those lines. These would be lines in the file that appear more than once. Is there a way to do this?
Thanks (4 Replies)
Discussion started by: aarondesk
on my cdrom, the length of the file names are 8 characters, not > 8. On a linux with the same cd, there are > 8 characters.
Urs (3 Replies)
Discussion started by: MuellerUrs