First page Back Continue Last page Graphics

Command if example

Using a command (no brackets needed):

if grep -q "string" file.txt; then

echo \"string\" found in file.txt

elif grep -q "something" file.txt; then

echo \"something\" found instead

else

echo neither \"string\" nor \"something\"

fi

Be sure to get rid of any output to stdout (grep's -q).

What PDL would have preceded this?