Search Results

Search: Posts Made By: prsshini
5,180
Posted By prsshini
When I run the command, it prompts as below... ...
When I run the command, it prompts as below...
$ /usr/xpg4/bin/awk -v p1=$pat1 -v p2=$pat2 '$0 ~ p1{f=1} f && $0 ~ p2{print;end}' file
input file "-v"$ Started
ksh: Started: not found

I am not...
5,180
Posted By prsshini
Hi Thanks a lot. $ /usr/xpg4/bin/awk '$0 ~...
Hi Thanks a lot.
$ /usr/xpg4/bin/awk '$0 ~ p1{f=1} f && $0 ~ p2{print;end}' p1=$pat1 p2=$pat2 subha
input file "Started"aaaa
aaaa
$

I get " input file "Started" " in the output. Can we...
5,180
Posted By prsshini
Sorry for buggin u.. I still get the same error...
Sorry for buggin u..
I still get the same error

$ echo $pat1
Processing
$ echo $pat2
aaaa
$ cat test
asdsf

aaaa

adsajd

asda



Processing
5,180
Posted By prsshini
Hi, Thanks for the response. But I get a syntax...
Hi, Thanks for the response.
But I get a syntax error

$ echo $pat1
Processing Started
$ echo $pat2
EDI
$ awk '/$pat1/{f=1} f && /$pat2/{print;end}' test.dat
awk: syntax error near line 1...
5,180
Posted By prsshini
Hello sir, I have a similar example in...
Hello sir,



I have a similar example in which I need to search for a pattern from a particular point of the file. Say for ex,



The file has



asdsf

aaaa

adsajd

asda
8,078
Posted By prsshini
Thanks a lot Frank. it works perfect.
Thanks a lot Frank. it works perfect.
8,078
Posted By prsshini
Hi frank, one more help please, I do below to...
Hi frank, one more help please,
I do below to list my files in chronological order.
ls -ltr *.datx* | tr -s ' ' | cut -d' ' -f9

it gives me list of files like below.
...
8,078
Posted By prsshini
Many Thanks Frank, it works perfect.
Many Thanks Frank, it works perfect.
8,078
Posted By prsshini
get the latest file by reading the date in the filename.
Hi,
I grep for a pattern in a list of files.

"grep -i -l $pattern *.datx*"

it may give me n number of files.
say for eg, it gives me 2 files....
9,678
Posted By prsshini
I have a similar issue. I grep for a pattern...
I have a similar issue.
I grep for a pattern in a list of files.
"grep -i -l $pattern *.datx*"
it may give me n number of files.

say for eg, it gives 2 files....
10,696
Posted By prsshini
Sure.... Thanks Frank.. Nice working with you....
Sure.... Thanks Frank.. Nice working with you. Good Luck, Regards.
10,696
Posted By prsshini
GREAAAAAAAATTTTTTTTtt.... WORKED PERFECT!!!!!!!...
GREAAAAAAAATTTTTTTTtt.... WORKED PERFECT!!!!!!! THAAAAAAAANKKKK YOUUUUUUUUUU... Could you tell me how do u manage to build these commands.. I also read manual but I am not able to do it at this...
10,696
Posted By prsshini
Okay. Here is the original file.I would want to...
Okay. Here is the original file.I would want to search for the pattern CID42H5ZNBWC119C1094445.
When I find the search pattern, i want to print the lines till I find the next CID. This needs to be...
10,696
Posted By prsshini
Hi, Thanks a lot for your patience. But this is...
Hi, Thanks a lot for your patience. But this is giving me only the first occurance in the file. I want to search the file till EOF and print the lines between search patterns. For Eg;
xxx1
1
2
3...
10,696
Posted By prsshini
Still not able to
Hi, Sorry to bother you. I am still not able to make it.. It says as follows..

$ uname -a
SunOS wdcsn99a 5.9 Generic_122300-28 sun4u sparc SUNW,Sun-Fire-15000
$ nawk 'p && /xxx/{exit}...
10,696
Posted By prsshini
Error
Hi
I am sorry but it gives the below error.
$ awk 'p && /xxx/{exit} /xxx/{p=1}p' test.datx
awk: syntax error near line 1
awk: bailing out near line 1

Please help. Thanks
10,696
Posted By prsshini
its the otherway
Hi
I m sorry for not being clear.. Its like
I want line from XXX till the line before next xxx..
say if
xxx
1
2
3
4
xxx,
i want the lines from first xxx till line4.
Could you please help....
10,696
Posted By prsshini
Hi, one more help pls... can u let me know to...
Hi, one more help pls... can u let me know to print the same lines but just before the line it finds xxx...
10,696
Posted By prsshini
Great!!
Awesome.. Works like exactly what i need.. Thanks a lot... Keep rocking!!!
10,696
Posted By prsshini
Print lines between the search pattern
hi,
I have a file say x.txt containing

xxx
123
bla
bla
...
you
xxx
dfk
dbf
...
me
xxx
...
...
keeps on..

i need to search for pattern in the line starting xxx in the file. If...
Showing results 1 to 20 of 20

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