![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems . |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Script required to get a required info from file. Pls. help me. | ntgobinath | Shell Programming and Scripting | 2 | 05-31-2008 05:34 AM |
| Help required on awk | meetavin | Shell Programming and Scripting | 3 | 04-18-2008 06:47 AM |
| SSL help required | binums | HP-UX | 0 | 05-03-2006 11:03 PM |
| Help required on DBX | Sumanth | SUN Solaris | 1 | 07-29-2004 06:54 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
Iam relatively new to Shell scripting. ............ ......... Cur_log_file=`ls -lrt LOGFILE* | grep 'Jun 30' | tail -1` ............... .................. Iam trying to find some log file name to check their status, using above script line. If the log file is not avaible then rest of the programs are not getting executed. I want to continue the program even if the log file not exist. Thanks in advance. Lokesha |
| Forum Sponsor | ||
|
|
|
|||
|
Yes Dhruva.
Execution of other script is dependent on "Cur_log_file" such log file status, run date and order date etc., Cur_log_file is current log file. Iam using while loop to find all jobs log status, if 'ls -lrt' failed to find "Cur_log_file" then it is displaying error message saying "No such file or directory" and process is hanging. Thanks for your concern, Lokesha |
|
||||
|
Hi Lokesha, You can try with this script.first you check that if the Cur_log_file contains the file and not the "no such file or directory" err message.So if that file exist then in IF statement use the script which checks your current log status run date and order date etc.,
Cur_log_file=`ls -lrt LOGFILE* | grep 'Jun 30' | tail -1` file_name=`echo $Cur_log_file | awk'{print $9}'` if [ -f $file_name ] then use your script after this if statement........... |
||||
| Google The UNIX and Linux Forums |