how to rerun the command without last argument in unix

Hi,

how to rerun the command without last argument in unix?

It means I have passed 4 arguments for execution but next time I want re-run the same command without last argument/parameter.

Please help me on this.
Last edited on
That depends on your shell. Bash, for example, has command line history, so you could tap Up-arrow once and then delete the trailing parameter with Backspace.
I am asking like as follows

>!3*
man bash Word Designators:
> echo foo bar gaz bah
foo bar gaz bah

> !!:0-3
echo foo bar gaz
foo bar gaz

Topic archived. No new replies allowed.