New answers tagged arguments
The feature that you are looking for is handled by the shell. It is called pathname expansion. For example, suppose that you are in a directory that contains the files file1 file2 file3 .. file50. You can specify all the files in the directory that start with file as an argument to to your perl script via: ./perl_script.pl file* To the shell, * means ...
mitsos@redhat24$ my_script "a=1;b=mitsos;c=karamitsos" #!/bin/sh eval $1 you 'v just injected command line parameters inside script scope !!
Yes. In any POSIX shell you can do... set -o vi ^[[num]-#^[[num]_ ...where ^[ represents the ESC key and [num] represents an optional parameter for nth history command counting backwards from the current one and nth argument in the previous command counting backwards from the last respectively. Depending on your keyboard config you may be able to use CTRL ...
With bash you can do nearly what you're asking for like this: echo !echo:$ So when you do echo This is fun ls echo !echo:$ the last line outputs fun. * instead of $ produces all the arguments to the matching command; so echo This is fun ls echo !echo:* outputs This is fun again; but you might as well just do !echo in this case. This isn't ...
If your bash in emacs-mode you can use Ctrl+w (delete last word) then Ctrl+u (input deleted string)
Top 50 recent answers are included