Search Results

Search: Posts Made By: gabe
28,046
Posted By gabe
solfreak is on the money with this one. If...
solfreak is on the money with this one.

If you consider that the test command is looking for a single argument, and then you provide it with a list, then it will only test the first item in that...
28,046
Posted By gabe
use double quotes around variable
Try using double quotes around your variable that holds the file name.

»if test -f "$filename"; then
©:echo "success"
©:else
©:echo "failure"
©:fi
success
Showing results 1 to 2 of 2

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