syd to [email protected] • 1 year agoAmber - the programming language compiled to Bashamber-lang.comexternal-linkmessage-square94fedilinkarrow-up1213cross-posted to: [email protected][email protected]
arrow-up1213external-linkAmber - the programming language compiled to Bashamber-lang.comsyd to [email protected] • 1 year agomessage-square94fedilinkcross-posted to: [email protected][email protected]
minus-square@[email protected]linkfedilink2•1 year agoI checked the docs, and I’m a bit confused with one thing. They show that you can capture the stdout of a command into a variabe, but they never show stderr being captured. How would that work?
minus-squaresydOPlinkfedilink1•1 year agoLike this: ‘’’ $mv file.txt dest.txt$ failed { echo “It seems that the file.txt does not exist” } ‘’’
minus-square@[email protected]linkfedilink4•1 year agoKnowing if a command failed and capturing stderr (which contains stuff like error messages) are not the same thing.
I checked the docs, and I’m a bit confused with one thing. They show that you can capture the stdout of a command into a variabe, but they never show stderr being captured. How would that work?
Like this: ‘’’ $mv file.txt dest.txt$ failed { echo “It seems that the file.txt does not exist” } ‘’’
Knowing if a command failed and capturing stderr (which contains stuff like error messages) are not the same thing.