LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   using string (https://www.linuxquestions.org/questions/linux-newbie-8/using-string-4175426933/)

brian00 09-12-2012 03:35 PM

using string
 
below is my code

Code:

!#/bin/ksh
log=/usr/oracle/rman

if [[ -n `ls $$log/myfile.tst | grep 'MYDB'` ]] ; then
startup


the -n to see if string "MYDB" within the myfile.tst doesn't seem to work, please help.

unSpawn 09-12-2012 03:52 PM

'grep -q -m1 MYDB $$log/myfile.tst' and use the $?

Tinkster 09-13-2012 04:41 PM

You have at least 4 other threads going that cover the same subject in slightly
different wording ... can you please NOT do this in the future? Closed.


All times are GMT -5. The time now is 05:37 AM.