Hello csj, Wednesday, April 04, 2001, 6:47:53 PM, you wrote:
c> On Wednesday 04 April 2001 09:41, Karsten M. Self wrote: >> csj ([EMAIL PROTECTED]) wrote: >> > Is there a way to copy or paste text into bash without the use of >> > a mouse? I'm thinking of a text file "file.txt" which contains >> > command sequences which I would like to touch up before running. >> > >> > I don't want to use an editor for this. Just the line editing >> > functions of bash. Offhand the only (untested) solution I can >> > think of is something like "cat file.txt >> .bash_history", >> > subsequently invoking another bash session. Is this stupid >> > (dangerous)? Does someone have a better solution? >> >> Just posted here this week. If you have wmaker installed, wxpaste >> and wxcopy do what you'd expect them to. c> It looks interesting. But I forgot to add: --without-X. For those c> dire moments when X crashes. c> On Wednesday 04 April 2001 09:49, Karsten M. Self wrote: >> ...another option. If you're just trying to execute a set of >> commands through bash: >> >> $ . <file> # "source" commands in file, current shell >> $ bash -f <file> # run commands in file (subshell) >> $ bash < <file> # run commands in file (subshell) c> My version is something like "cat file.txt | bash". Is this a bad c> idea. >> If you want to compose multi-line commands to run in bash without >> creating an explicit file: >> >> $ set -o vi # set 'vi' mode >> $ <esc>-v # invoke 'vi' editor >> # edit file, 'ZZ' or ':wq' when done. Commands execute. c> Hmm, does this really mean I have to really vi? Actually I was c> thinking of something like "cat file.txt > /dev/ttyX" which however c> pastes the thing not just on the screen but on the command line c> itself. Is there such a linuxian function? you can use shift+insert to paste into bash -- Best regards, Chris mailto:[EMAIL PROTECTED]

