Hi All,
I'm stuck with this issue when I try to display the searched string into a compressed file.
More exactly when I run this script
Code:
for f1 in $(find dir1 -type f -print); do gunzip -c $f1 | grep -n "gio" | awk -F":" '{print $1-1 "," $1 "p"}' | xargs -i sed -n {} $f1 ; done
returns
Code:
T Š A1
T £ A
΀y£`Ã
b
Hi
Here is the problem ( Exercise 3-3, Using The Shell of The Unix Programming Environment, Kerninghan, Pike, 3rd edition ):
Predict what each of the following grep commands will do, and then verify your understanding.
Code:
grep \$
grep \\$
grep \\\$
grep '\$'
grep '\'$'
grep \\
grep \\\\
grep "\$"
grep '"$'
grep "$"
A file containing these command
Hi im trying a GREP a varaiable which contains a file name and i search it in a list of .txt file and ifs its found the .txt file , it returns the name of the txt file name..the snippet im using is
Code:
foreach my $files (glob('*.txt'))
{
open(my $fh1, $files) or die("Unable to open '$files': $!");
{
if ( grep /$file/, <$fh1> )
{
$Sheet->Cells($row,$col+1)->{'Valu
Hi All
I'm having a problem grep'ing files for a certain string on my server. The command I'm using is:
find .
Hi,
I have to grep string from 20 - 30 files each carries 200 - 300 MB size and append to the
file. How to speed the
grepping time.
Code:
cat catalina.out_2012_01_01 | grep "xxxxx" >> backup.txt
PLZ, Suggest me,
Regards,
Nanthagopal A
Hi,
I want to run a target of makfile using script by passing different arguments to it again n again.
Hi,
I'm testing nginx-cache-purge and notice that grep searches all file content, and since the cache key is in the second line I would like to limit grep searching.
This is the script I'm using:
github.com/perusio/nginx-cache-purge
The line I would like to change and limit grep search to the Second line is:
Code:
find $2 - maxdepth 1 - type d | xargs - P $max_ pa ralle l - n 1
hi,
I would like to monitor a log file, which rolls over, everytime a server is restarted.
I would like to grep for a string, and to be more efficient i'd like to grep only newly appended data. so something like a 'tail -f' would do, however, as the log rolls over i think a 'tail -F' is what i need, but this doesn't seem to be available in Solaris.
so any ideas welcome.
Ok, running tsm on 2008R2, and I have the gnu awk and grep installed...I want to only capture inactive (I) files inside of the backup...I can get this to work on linux, but because windows interprets " ' ` differently, i can't get it to print out right...Here's what I have:
so basically here's the command
Code:
F:\Program Files\Tivoli\TSM\baclient>dsmc q backup f:\* -subdir=yes