Accepting text from command line like you would a file
I know you can essentially replace STDIN with a file by doing something like:
<command> < file.txt
Is there a way to do that with actual text? In my mind it would look something like:
<command> < 'some text to use as input in the script'
However, I can see that that might not work since, it's hard to do things like carriage returns. So similarly, if I did want carriage returns, could I do something like "some text\n some more text\n" to emulate the carriage returns.
The reason I'm asking is I want to pass passwords, and I don't like the idea of creating temporary files with the passwords in there.
|