I primarily use ksh, but now I am being forced to use bash. In my scripting before, I used the read command extensively, but this doesn't seem to function the same with bash.
For example, the following works in ksh, but NOT in bash:
ksh:
$ echo 10 | read a
$ echo ${a}
10
bash:
$ echo 10 | read a
$ echo ${a}
<blank>
This is an overly simplified example, but I'm just wondering how to get the same functionality. Any help is appreciated!
For example, the following works in ksh, but NOT in bash:
ksh:
$ echo 10 | read a
$ echo ${a}
10
bash:
$ echo 10 | read a
$ echo ${a}
<blank>
This is an overly simplified example, but I'm just wondering how to get the same functionality. Any help is appreciated!