Search Results

Search: Posts Made By: wannalearn
1,662
Posted By wannalearn
i used the following sytax instead while...
i used the following sytax instead

while read i
do
echo $i
sleep 30 &
done <test
1,662
Posted By wannalearn
hi
np..I just found the solution :)
1,662
Posted By wannalearn
wait problem
Hello, I have been trying to figure out why the wait isnt waiting for the sleep process to complete till now and have found out that since sleep runs as different process and not a child process the...
4,100
Posted By wannalearn
thanks guys
Thanks Era and Danmero..

Both your solutions work great! but i would go for the grep option as i am using the grep -f option which is not available with awk.

Era.. your grep solution can be...
4,100
Posted By wannalearn
hi
Hi Era,

Thanks for your reply...but with grep -o 'is\.it' file , the output would be as follows

is.it
is.it

that is "is.it" appears twice in the output...I know we can do an uniq to get it...
4,100
Posted By wannalearn
grep this!
This might sound easy but its not...

I have a file a with the following data...including the 1,2 and 3

1 this.is.it
2 is.it
3 this.is

now i need to grep for "is.it" ONLY in the file...
21,230
Posted By wannalearn
Thanks Madhan... What if the script takes in...
Thanks Madhan...

What if the script takes in two input parameters..it becomes tricky then eh?

First parameter-$1-email
Second parameter- $2 -number(eg: 400 ,300)

awk '$1 == $2' abc.log...
21,230
Posted By wannalearn
awk/input parameter
Hi,

My script takes in one input parameter($1-email id) on the command line...

The script contains something like this...

awk '$1 == 400' abc.log >def.log
mail -s subject $1 <def.log
...
36,011
Posted By wannalearn
nope
-E doesnt help too...

I came around with a workaround using awk -F ! :-)
36,011
Posted By wannalearn
hmm..
This wont help..
Print NUM lines of trailing context after matching lines..


Instead of lines I need pattern


Eg: Say i search for a pattern abc...the result i get is hdhd fhfhfh abc hdh...
36,011
Posted By wannalearn
grep to show lines only after pattern
When i grep for a pattern the search results comes up with matching lines(some before the pattern and some after)...how can i limit the search so that it shows only the lines after the pattern...
143,275
Posted By wannalearn
thanks
Why didnt i think of this :-)

Working Gr8! Thanks!
143,275
Posted By wannalearn
Hmmm....
I know this works when you type this in the command prompt..I can type my own body and its done..

My concern being the same cannot be reproduced if I put this in a script and want the body...
143,275
Posted By wannalearn
hmmm..
Hi When i use the syntax given in the site ..i get a ">" after executing the below line

When i type the below and hit enter
cat <<content | sendmail -t a@b.com


I get this
cat <<content |...
143,275
Posted By wannalearn
sendmail subject
what is the syntax for sending a subject ?

sendmail -t a@b.com

The person receives the mail with an empty subject!

the man pages dont give anything related to subject...anybody??
2,787
Posted By wannalearn
okie
okie...just came out with a work around :-)
2,787
Posted By wannalearn
hmmm..
Sorry by using grep thrice totally not four times :-)
2,787
Posted By wannalearn
If i do this cut -d"/" -f5 | egrep -e "p2" ...
If i do this
cut -d"/" -f5 | egrep -e "p2"
it will be grepping on the output because we are using the pipe....

grep pattern a.log|grep -e "p1" |cut -d":" -f1,2,3,4,8,9,10|cut -d"/" -f5 -e...
2,787
Posted By wannalearn
well
well i need that -e there as i wanna search for another pattern....do u think i need to use braces anywhere?
2,787
Posted By wannalearn
plz correct this
grep pattern a.log|grep -e "p1" |cut -d":" -f1,2,3,4,8,9,10|cut -d"/" -f5 -e "p2" |cut -d":" -f1,2,3,4,6|cut -d"/" -f5 >> file

Dont know why the above command isnt working :-(

can someone...
9,704
Posted By wannalearn
hi
tail -f just displays the realtime appended output of the file...not just the 10lines

anyways i figured out a way using awk..but would gr8 if we can do it using grep
9,704
Posted By wannalearn
tail -f
I am trying to extract a particular line from a.log which keeps appending every sec and output that into a newfile b.log which should append itself with filtered data received from a.log

I tried ...
2,434
Posted By wannalearn
hmm...
Sudo is installed on the remote system...sudo works when i login to the remote system without ssh. I have used -t bcuz i was getting a notif saying &TERM and -T is not specified.
2,434
Posted By wannalearn
sudo problems
I am trying to execute a command via sudo through ssh...

something like this...

ssh -t a@b "sudo command"

getting an error saying sudo: command not found

what could be the prb?
1,448
Posted By wannalearn
done
Just tried ssh -t option and i am not getting that error anymore!
Showing results 1 to 25 of 33

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