You can very well use echo for that purpose.
$ cat new
echo 1
$ number=$(./new)
$ echo $number
1
I think that serves the purpose.
comment below if I mis-assumed something
You can very well use echo for that purpose.
$ cat new
echo 1
$ number=$(./new)
$ echo $number
1
I think that serves the purpose.
comment below if I mis-assumed something