I want to take the absolute of a number by the following code in bash:
#!/bin/bash echo \"Enter the first file name: \" read first echo \"Enter the second f
You might just take ${var#-}.
${var#-}
${var#Pattern} Remove from $var the shortest part of $Pattern that matches the front end of $var. tdlp
${var#Pattern}
$var
$Pattern
Example:
s2=5; s1=4 s3=$((s1-s2)) echo $s3 -1 echo ${s3#-} 1