Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

What is Equalent to grep -p in Linux?

$
0
0
I am working on below command where as its working on AIX(UNIX) but not in linux .


# Look for local databases

HTML Code:

DATABASES=$(db2 list database directory | grep -p Indirect | grep "Database name" | awk '{ print $NF}
')


Output should be a databasename (ABCDEF) .


Error:
grep: invalid option -- 'p'
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.

Viewing all articles
Browse latest Browse all 16232

Trending Articles