I have something like this:
echo "string1" > /sys/../../../..
In case this throws an error I want to capture that. Currently I am unable to do that. Can you suggest how can I do this?
I tried:
(echo "string1" > /sys/../../../..) > abc 2>&1 # does not work
All the directly paths exist here.