2
votes
Accepted
How to convert code from test format to if fi format?
I think the most direct way to convert your code is:
if ! test "$IN_TERM"; then
export IN_TERM=1
konsole -e "$0"
exit 0
fi
You can then rewrite it as
if ! [[ "$...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
shell-script × 1440linux × 535
bash × 504
shell × 267
bash-scripting × 160
unix × 138
script × 133
command-line × 115
macos × 99
windows × 69
powershell × 65
ubuntu × 60
terminal × 47
sed × 44
awk × 38
ssh × 34
batch-file × 31
batch × 30
zsh × 29
find × 26
cron × 25
windows-10 × 24
sh × 24
grep × 22
perl × 20