I have two commands “ls -h” and “ls -ltr”. How do i make sure “ls -ltr” is run after “ls -h” is suc

help me

Exit status of last run command is stored in a special variable $? . Read this link , and see how you can use this to suit your purpose. Let us know what you could come up with.

1 Like

I hope this helps.

bakunin

4 Likes