Don't use #!/bin/sh -- it's useless
UNIX absolute file names will always start with /
Don't quote oldstty state
Its defined in stty.1p line 47, that $(stty -g) will never produce string that will make shell expand arguments
Don't use if ith only 1 command, it's unreadable
Having if with only 1 command in its body is useless and unreadable
I Changed it to stty $oldstty || stty sane
Delete useless quotes
$!, $? and $$ will always be an int type
Dont use && with trap
trap will only return non-zero if signal name is invalid
#!/bin/sh --
it's useless UNIX absolute file names will always start with/
oldstty
state Its defined instty.1p
line 47, that$(stty -g)
will never produce string that will make shell expand argumentsif
ith only 1 command, it's unreadable Havingif
with only 1 command in its body is useless and unreadable I Changed it tostty $oldstty || stty sane
$!
,$?
and$$
will always be an int type&&
withtrap
trap will only return non-zero if signal name is invalid