Search Results

Search: Posts Made By: rahulbahulekar
1,798
Posted By balajesuri
I've used bash. Check if this for you. ...
I've used bash. Check if this for you.
#!/bin/bash
OLDIFS=$IFS
IFS=\n
filename=`ls -ltrh *.Z`
echo $filename | mailx -s "FOR TESTING" rahul.b@infotech.net
IFS=$OLDIFS

Also, try doing this:...
979
Posted By methyl
The Shell contains a simple test for the presence...
The Shell contains a simple test for the presence of a file. There is no need to run "ls".
#!/bin/ksh
filename="name.sh"
if [ -f "$[filename}" ]
then
echo "${filename} is present"
else
...
979
Posted By guruprasadpr
Hi #!/bin/ksh file_found=`ls name.sh 2>...
Hi


#!/bin/ksh
file_found=`ls name.sh 2> /dev/null`
found=`echo $?`
if [ $found -eq 0 ]
then
echo "$file_found is present"
else
echo "name.sh is not present"
fi

Guru.
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 09:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy