For example, I create a shell script number1.sh
takes a file as an argument and prints the bytes of the file. Now, I have another shell script number2.sh
which also takes a file as argument, and in this shell script I have:
#!/bin/bash 7
fileByte="./number1.sh $1"
if [ "$fileByte" -eq 0 ]
then
.....
I want to compare the print result of the command ./number1.sh $1
to the integer 0, but in this case "$fileByte"
is ./number1.sh
, how should I proceed?