syd@lemy.lol to Programming@programming.dev · 6 months agoAmber - the programming language compiled to Bashamber-lang.comexternal-linkmessage-square17fedilinkarrow-up11arrow-down10file-textcross-posted to: programming@programming.dev
arrow-up11arrow-down1external-linkAmber - the programming language compiled to Bashamber-lang.comsyd@lemy.lol to Programming@programming.dev · 6 months agomessage-square17fedilinkfile-textcross-posted to: programming@programming.dev
minus-squareyetAnotherUser@lemmy.calinkfedilinkarrow-up0·6 months 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-squaresyd@lemy.lolOPlinkfedilinkarrow-up0arrow-down1·6 months agoLike this: ‘’’ $mv file.txt dest.txt$ failed { echo “It seems that the file.txt does not exist” } ‘’’
minus-squareyetAnotherUser@lemmy.calinkfedilinkarrow-up1·6 months 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.