Search Results

Search: Posts Made By: kchinnam
17,010
Posted By kchinnam
Try this .. ls -l /etc/*.txt > /dev/null 2>&1;...
Try this ..
ls -l /etc/*.txt > /dev/null 2>&1; result=$?

# check result
if [ $result -ne 0 ]; then
echo "command failed "
else
echo "command succeeded "
fi

If you are bent on using...
1,575
Posted By kchinnam
Another well known approach $>...
Another well known approach

$> file="/var/local/dsx/import/gen_cell_orig_001.dsx"; echo $(basename "$file")
gen_cell_orig_001.dsx
Showing results 1 to 2 of 2

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