If I instead wan to list all items in file1 that does not exist in file2 by negating how can that be done?
I tried the -v flag but it did not do this, am I missing something here or is it not possible to do this with grep alone? I have used -v before with grep but never combined with -f that is new to me.
Hi,
I have this kinda of data:-
0,0,0,0,1,2,0,4,5,6,7,foo
0,0,0,0,1,4,0,5,5,5,5,foo1
0,0,6,0,1,6,0,6,1,2,3,orange
etc...
I wanted to remove the 0 which occur on the same rows of foo,foo1 and orange in this case.
Desired output is:-
0,1,2,4,5,6,7,foo
0,1,4,5,5,5,5,foo1... (9 Replies)
Folks
I've been struggling this with for far too liong now and need your help!
I've been happily using grep for a search of a directory, to list the files which contain a string:
find . -type f -mtime -5 -print | xargs grep -l 'invoiceID=\"12345\"'
Now the list of 'invoiceID' I am... (4 Replies)
Hi all,
I am a unix noob. Need some basic help. I have tried using google, but not able to figure this out.
Here are the scenarios:
1. How do I find a directory with a particular name, say "Merlin" in the entire file system? I tried :
find / -type d -name "dir_name"
The problem is I'm... (3 Replies)
How can I recursively find all files in a directory and print out the file and first line number of any text blocks that match the below cases?
This would seem to involve find, xargs, *grep, regex, etc.
In summary, I want to find so-called empty "try-catch blocks" that do not contain code... (0 Replies)
Hi Everybody..
I'm a "newbie" to using Command-line... A few half-remembered DOS commands from 30 years ago, and the very handy "Sudo rm -R pathname" REMOVE command...
I do a lot of "cleaning" of plain-text OCR text files. with assorted common
line-break, punctuation and capitalization... (1 Reply)
I have a file that is a sort library in the format:
##def title1
content1
stuff1
content2
stuff2
##enddef
##def title2
etc..
I want to grep def and content and pull some trailing context from content
so the result would look something like: (1 Reply)
Hi,
I've got to setup a script that will run daily, and find a log file of a certain age, and then compress and transfer this file to a new location.
so far i've been able to specify the file i want with:
find . -name 'filename.*.log' -mtime 14 -exec compress -vf {} \;
this prints out... (4 Replies)
I have a flat file that looks like this, let's call it Chromosome_9.txt:
FT /Gene_Name="Guanyl-Acetylase 9"
FT /Gene_Number"36952"
FT /Gene_Name="Endoplasmic Luciferase"
FT /Gene_Number"36953"
FT ... (4 Replies)
Hi,
I have a requirement like i have to find out files and remove them on a daily basis.
The files are generated as
abc_jnfn_201404230004.csv
abc_jnfo_201404230004.csv
abc_jnfp_201404230004.csv
abc_jnfq_201404230004.csv
abd_jnfn_201404220004.csv
abe_jnfn_201404220004.csv
i want to... (1 Reply)