Quote:
Originally Posted by learnbash
Hello,
thanks for your reply, but i want to replace only true output to "1", ls always return "0" how could i replace only ls command output to "1".
Thanks,
Bash
|
no, 'ls' does not always return '0'.
here's what 'man ls' yields:
Code:
EXIT STATUS
0 All information was written successfully.
>0 An error occurred.
just curious, why would you want to return a non-zero value when 'ls' was successful?