| PLEX86 | ||
|
lynx sendmail from script 93
printf "%s" "x" printf "%s" "string1" TRY IT TO BELIEVE IT Earn money without estress! MAKE UNLIMITED MONEY USING PAYPAL!!! $6.00 ONE TIME FEE!!! Can you really make money... or, if you want to add a newline: printf "%s-n" "string1" cat File1 I presume you want to ***input*** the data into lynx as if it were coming from the keyboard, not just ***output*** it to the screen. For this you use pipes, which connects two programs (or commands) so the *output* of one is fed as input into the other. Write two commands, separated by a " character: printf "%s-n" "Barf" lynx The next step is to have *multiple* commands on the left hand side of the ". Use parentheses: Context switching problem Right now my machine is essentially idle, and I get (first line deleted): $ vmstat 5... ( printf "%s" "Barf" printf "%s" "Meaaw" ) lynx There is also the "echo" command that is simpler to use than "printf". echo "Barf" echo "Meaaw" but when you get a tad more advanced, and begin to use variables: echo "$var" you may be in for a few surprises. Usually not, hard to predict when. For programming, printf is reliable, predictable, but looks a little more ugly when you read your script. I have not tested the above, it is possible that lynx tests what kind of device the input is coming from. It may even complain that it cannot run from a pipe, it wants a terminal! There are ways to handle that, but it's a bit more complicated, and I'll rather address it if you say it is required. -Enrique
|
||||
Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||