Search Results

Search: Posts Made By: Ganesh L
1,956
Posted By RavinderSingh13
Hello Ganesh L, Following may also help you...
Hello Ganesh L,

Following may also help you in same.

awk 'FNR==NR{X[$4]=$0;next} ($1 in X){;delete X[$1]} END{for(i in X){print X[i]}}' two.txt one.txt


Output will be as follows.

abc...
1,956
Posted By jim mcnamara
one way: awk 'FILENAME=="one.txt"...
one way:


awk 'FILENAME=="one.txt" {arr[$1]++}
FILENAME=="two.txt" {
if($4 in arr){next}
print $0
} ' one.txt two.txt > new2.txt
1,969
Posted By Lucas_0418
Hi , The codes run successfully in my...
Hi ,
The codes run successfully in my cygwin environment, and I am sorry that I can't get any more test environment in weekend.
What's your environment , OS ? awk version ?
And I...
1,969
Posted By Lucas_0418
Hi guy, try this and may it could work.$...
Hi guy,
try this and may it could work.$ echo '1001 000 HEADER
1001 001 RAJESH
1001 002 100
1001 002 200
1001 002 500
1001 006 FOOTER
1002 000 HEADER
1002 001 RAMESH
1002 002 100
1002...
11,305
Posted By Skrynesaver
How is it not working? Does it display an...
How is it not working?
Does it display an error, and if so what does the error say?
Which version of unzip have you installed?

unzip -l $archive is the command you should be issuing to get a...
10,969
Posted By codemaniac
okay if you are not using GNU find then i guess...
okay if you are not using GNU find then i guess maxdepth will not be available.

You can do something like below using prune to not descending to and directory other than "dir".
find...
10,969
Posted By codemaniac
the gnu find has a maxdepth option that lets you...
the gnu find has a maxdepth option that lets you restrict the search to the current directory.

can you try something like below.

find . -maxdepth 1 -mtime +30
10,969
Posted By codemaniac
you can find the files older than 30 days and...
you can find the files older than 30 days and archive them with the below commandline.

find . -mtime +30 | xargs tar cvzf archive.tar

remove files older than 30 days with the below commandline....
7,099
Posted By Skrynesaver
From the command line: grep '^M' FILENAME...
From the command line:
grep '^M' FILENAME >/dev/null && echo "DOS EOL present"

However the trick is the insertion of the ^M charachter at the command line, if you preceed it with a [Ctrl]-V the...
7,099
Posted By PikK45
grep -q "^M" infile --> use Ctrl+V then Ctrl+M to...
grep -q "^M" infile --> use Ctrl+V then Ctrl+M to get ^M don't type ^ and M
Showing results 1 to 10 of 10

 
All times are GMT -4. The time now is 05:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy