Search Results

Search: Posts Made By: RudiC
7,603
Posted By RudiC
Hmmm - sounds reasonable, but (linux, bash):$...
Hmmm - sounds reasonable, but (linux, bash):$ X=$(ls xyyxyx 2>/dev/null)
$ echo $?, ">"$X"<"
2, ><
while $ X=""
$ echo $?, ">"$X"<"
0, ><
So the 2 would be the ls' exit status, wouldn't it?
7,603
Posted By RudiC
Good you found a fix by yourself! Still, for e.g....
Good you found a fix by yourself! Still, for e.g. later reference, these were the errors in your first script, which you did not correct but circumvent:
a) put the redirection inside the command...
Showing results 1 to 2 of 2

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