Apologies if this is a basic concept, but I was wondering how to incorporate the userinput immediately after running the code. Same line, no prompt.
I tried:
#!/bin/bash
read userinput
but that results in reading the userinput in the next line over. i.e. (assuming UserInput is 2):
$./programname
2
For reference, I want to essentially type:
$./programname 2
directly into the command line, without a newline.