10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to remove lines in the target.txt file if $5 before the - in that file matches sorted_list. I have tried grep and awk. Thank you :).
grep
grep -v -F -f targets.bed sort_list
grep -vFf sort_list targets
awk
awk -F, '
> FILENAME == ARGV {to_remove=1; next}
> ! ($5 in... (2 Replies)
Discussion started by: cmccabe
2 Replies
2. Shell Programming and Scripting
Hello experts
I have a file with paragraphs begining with a keeping date and ending with "END":
20120301 num num
John num num A keepnum1 num num
kathrin num num A keepnum1 num num
kathrin num num B keepnum2 num num
Pete num num A keepnum1 num num
Jacob num... (2 Replies)
Discussion started by: phaethon
2 Replies
3. Shell Programming and Scripting
Hello
I have a large file1 which has many events like "2014010420" and following lines under each event that start with text . It has this form:
2014010420 num --- --- num ....
NTE num num --- num...
EFA num num --- num ...
LASW num num --- num... (9 Replies)
Discussion started by: phaethon
9 Replies
4. Shell Programming and Scripting
Hi,
I have an issue to combine multiple lines of a file. I have records as below.
Fields are delimited by TAB. Each lines are ending with a new line char (\n)
Input
--------
ABC 123456 abcde 987
890456 7890 xyz
ght gtuv
ABC 5tyin 1234 789
ghty kuio
ABC ghty jind 1234
678 ght
... (8 Replies)
Discussion started by: ratheesh2011
8 Replies
5. Shell Programming and Scripting
hi,
I would like to search for a specific string at a specific line in a file and would like to know the count of it.
eg: samp.txt
ABC 1234 BELL
HNZ 4567 RING
NNN 5673 BELL
Please help with the command to find the count of BELL in the above file samp.txt at the specific line 10 with... (7 Replies)
Discussion started by: techmoris
7 Replies
6. UNIX for Dummies Questions & Answers
Hello all, new to unix and have just found the forum.
I think I will be here quite often, and hope that in time i will be able to provide soem help, role on not being a newbie anymore :)
I have a question which iI am hoping someone could help me with.
If i have a file with lines in in thus... (8 Replies)
Discussion started by: grom
8 Replies
7. Shell Programming and Scripting
Hi all,
Sorry for the title, I was unsure how to word my issue. I'll get right to the issue. In my text file, I need to find all lines with the same data in the first field. Then I need to create a file with the matching lines merged into one. So my original file will look something like... (4 Replies)
Discussion started by: rstev39147
4 Replies
8. Shell Programming and Scripting
Howdy.
I know this is most likely possible using sed or awk or grep, most likely a combination of them together, but how would one go about running a grep like command on a file where you only try to match your pattern to the second field in a line, space delimited?
Example:
You are... (3 Replies)
Discussion started by: LordJezoX
3 Replies
9. Shell Programming and Scripting
hello
I have a number of lines that need to be added at the end of a file each time I add a field in another file (let's name it file2)
file2 has this format:
filed1:field2:path1:path2:path3:path...
Whenever I add a path field, I should add to file1 these lines:
<Location path1>... (0 Replies)
Discussion started by: melanie_pfefer
0 Replies
10. UNIX for Dummies Questions & Answers
hii..
I have a pipe delimited file
For ex:
TEST_1-8J6TZN|ASLANK|BHR-09||TRAM
I want to grep for NULL in the 4th field only from the above file
Please suggest
Also let me know if there is any limitation in the suggested command
Thanks all in advance..!! (5 Replies)
Discussion started by: sureshg_sampat
5 Replies