10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have multiple (~80) files (some can be as big as 30GB of >1 billion of lines!) to grep on a pattern, and piped the match to a single file. I have a 96-core machine so that each grep job was sent to the background to speed up the search:
file1.tab
chr1A_part1 123241847 123241848... (6 Replies)
Discussion started by: yifangt
6 Replies
2. UNIX for Beginners Questions & Answers
Hi everyone :)
I have a file "words.txt" containing hundreds of lines of text. Each line contains a slogan.
Using the code below i am able to generate an image with the slogan text from each line.
The image filename is saved matching the last word on each line.
Example:
Line 1: We do... (2 Replies)
Discussion started by: martinsmith
2 Replies
3. Shell Programming and Scripting
Hello,
I supposed that I asked the similar question but I could not have found it when I search on our forum.
EXYU+:
EXYU%3A+HRT+1
EXYU%3A+HRT+2
EXYU%3A+HRT+3
EXYU_url:
#SERVICE 1:0:1:0:0:0:0:0:0:0:http%3A//xxxx%3Ayyyy@mmmm%3A55555/stream/channelname/YYYY?profile=htsp7777.ts
#SERVICE... (2 Replies)
Discussion started by: baris35
2 Replies
4. UNIX for Dummies Questions & Answers
Hello everyone.
I would like to know if I can use grep or zgrep to search for a particular pattern then print the x number of lines after the pattern was found.
Lets say for example a pattern was found on line 3, I wanted the output to show lines 3, 4 and 5.
Thanks! (10 Replies)
Discussion started by: khestoi
10 Replies
5. UNIX for Dummies Questions & Answers
I`m having a output shown below,
CFR 235,BBC DM-2 ALL
CFR 111,BBC DM-2 ALL
CFR 333,BBC DM-2 ALL
from the above Output i want to use 235,111,333 as input for other purpose.
these no always change every time i run script.so please suggest me the way i could do it with example,i have tried... (5 Replies)
Discussion started by: nitin_aaa27
5 Replies
6. Shell Programming and Scripting
Hi all,
I want to display line number for matching string in a file. can anyone please help me.
I used
grep -n "ABC" file
so it displays
6 ABC.
But i only want to have line number,i don't want that it should prefix matching context with line number.
Actually my original... (10 Replies)
Discussion started by: sarbjit
10 Replies
7. Shell Programming and Scripting
Hello,
I have over 200 files and some of them have the string like "John price $200". I would like to grep the string. Then output the filename which found the string.
I have the following script, but it ONLY output the string
echo Please input list file name:
read listn
for file in `cat... (3 Replies)
Discussion started by: happyv
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I am using the Korne shell to try and get the filename, line number and the line of text using grep e.g.
find ./ -type f -name "*.java" -exec grep -nf test.txt '{}' \;
(test.txt contains strings to search)
will return the line number and the line of text.
grep -l would return the... (4 Replies)
Discussion started by: ceemh3
4 Replies
9. Shell Programming and Scripting
What would be the easiest way to grep all files within a particular directory that match a partial filename? For example, searching all files that begin with "filename.txt" and are appended with the date they were created. I am using Ksh 88, btw. (3 Replies)
Discussion started by: mharley
3 Replies
10. Shell Programming and Scripting
I have the following line in a script that searches files in several directories and shows the search results on the screen.
ls "$path" | xargs cat | tr -s " " | fgrep -i "$search_arg"
But, because I'm also using CAT and TR, the output from the search does not display the name of the file... (6 Replies)
Discussion started by: netguy
6 Replies