Hi
the buffer that I am working on:
Filesystem kbytes used avail capacity Mounted on /proc 0 0 0 0% /proc /dev/dsk/c0t0d0s0 962134 803782 100624 89% / /dev/dsk/c0t0d0s6 4030518 1340030 2650183 34% /usr fd 0 0 0 0% /dev/fd /dev/dsk/c0t0d0s3 4030518 826753 3163460 21% /var /dev/dsk/c0t0d0s7 5498622 5413039 30597 100% /home /dev/dsk/c0t0d0s5 3007086 936744 2010201 32% /opt swap 2313128 1216 2311912 1% /tmp /vol/dev/dsk/c0t2d0/volume_name 636528 636528 0 100% /cdrom/volume_name
and I declearde pattern :
\s+(\d+)\s+(\d+)\s+\d+\s+(\d+)\%\s+(.*)
the question is: How can I declered pattern that will get alllines except the line that I have the text "cdrom"?
thanks
Hi!
Try \s+(\d+)\s+(\d+)\s+\d+\s+(\d+)\%\s+(?!.*cdrom)(.*)
Regards
Log in to post a comment.
Hi
the buffer that I am working on:
Filesystem kbytes used avail capacity Mounted on
/proc 0 0 0 0% /proc
/dev/dsk/c0t0d0s0 962134 803782 100624 89% /
/dev/dsk/c0t0d0s6 4030518 1340030 2650183 34% /usr
fd 0 0 0 0% /dev/fd
/dev/dsk/c0t0d0s3 4030518 826753 3163460 21% /var
/dev/dsk/c0t0d0s7 5498622 5413039 30597 100% /home
/dev/dsk/c0t0d0s5 3007086 936744 2010201 32% /opt
swap 2313128 1216 2311912 1% /tmp
/vol/dev/dsk/c0t2d0/volume_name
636528 636528 0 100% /cdrom/volume_name
and I declearde pattern :
\s+(\d+)\s+(\d+)\s+\d+\s+(\d+)\%\s+(.*)
the question is:
How can I declered pattern that will get alllines except the line that I have the text "cdrom"?
thanks
Hi!
Try
\s+(\d+)\s+(\d+)\s+\d+\s+(\d+)\%\s+(?!.*cdrom)(.*)
Regards