Skip to main content
Make explanation more verbose and fix use of angle brackets (which don't get displayed)
Source Link
Peter L
  • 3.5k
  • 1
  • 35
  • 34

I needed to run an operation that required keystrokes[Enter] keystrokes (there was no --quiet or --force).
Using read as an example target operation, I did something like this:

$ read x <<< "x-value
> "
$ echo $x
x-value

(Note the > is added automatically by Bash)

I needed to run an operation that required keystrokes (there was no --quiet or --force). I did something like this:

$ read x <<< "x-value
> "
$ echo $x
x-value

I needed to run an operation that required [Enter] keystrokes (there was no --quiet or --force).
Using read as an example target operation, I did something like this:

$ read x <<< "x-value
> "
$ echo $x
x-value

(Note the > is added automatically by Bash)

Source Link
Peter L
  • 3.5k
  • 1
  • 35
  • 34

I needed to run an operation that required keystrokes (there was no --quiet or --force). I did something like this:

$ read x <<< "x-value
> "
$ echo $x
x-value