On 2009-05-07, aki <akhileshrawat007@gmail.com> wrote:
>
>
> Hi ,
>
> I have a line in script as below.
>
> METHODRES="$(ls -1 ${L_ROLLBACK_DIR}/${L_ROLLBACK_FILE}* 2>&1)"
>
> i think if file is present in above case the value of METHODRES will
> be 0.
No, it will be the output of the ls command.
> wat is the significance of (2>&1) i do not understand much.
> I think it will output std err to std output by this (2>&1) .
> I am not sure what will the value of METHODRES in error cases.
>
If an error occurs, METHODRES will contain the error message.
> Will any one clear my doubts .
>
> Thanks in Advance !!!
>
>
> Regards
> Aki