I am working on below command where as its working on AIX(UNIX) but not in linux .
# Look for local databases
')
Output should be a databasename (ABCDEF) .
Error:
grep: invalid option -- 'p'
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
# 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.