Hi Every one
I have a file in the following manner...
AAAAAAPERFORM WRITEQ
BBDFDDPERFOMF WRITEQ
FFFF *PERFOMF WRITEQ
i want to find the lines which donot have * in 7th position..
I have tried this but some problem i think...
grep '......[^\*][.]*WRITEQ' INpFIle...
any 6 chars not followed by * and any char followed by WRITEQ
but this gets me everyting... including 7th char as *
aigles
2
Try this :
grep -v '^......\*.*WRITEQ' infile
Jean-Pierre.
anbu23
3
grep '^.\{6\}[^*].*WRITEQ' filename
sed -n '/^.\{6\}[^*].*WRITEQ/p' filename
Small Help
My inp file is
TSQGN8* MOVE 'WRITEQ ERROR' TO MSG-FIELDO
*
MOVE 1 TO WS-TS-ITEM.
******* CHANGE FOR CICS END*******
EXEC CICS WRITEQ TS QUEUE
ABCD
EFGH
END-EXEC.
I am using the following
awk '/^.\{6\}[^*].* WRITEQ /,/END-EXEC/' InpFile
I wanted to find the line Between WRITEQ and END-EXEC
Provided WRITEQ is no Commented and has one space before and after
the Out put should be
EXEC CICS WRITEQ TS QUEUE
ABCD
EFGH
END-EXEC.
but i dont now it fails....
another way
awk 'BEGIN{FS=""}$7 != "*"' file
the following worked...
awk '/^......[^*].*WRITEQ/,/END-EXEC/p' temp
Thanks,,,