Substitute "#" with "echo" and type enter. The command will be printed but after Shell expansion (typically the wildcard, *, but also the variables, etc.). Try for instance:
$ echo cp /var/log/syslog* $HOME
Here it returns:

cp /var/log/syslog /var/log/syslog.1 /var/log/syslog.2.gz /var/log/syslog.3.gz /var/log/syslog.4.gz /var/log/syslog.5.gz /home/banana Once the command checked, go back a line in the history (C-p or the up arrow), move the cursor to the beginning of the line (C-a or Home) delete "echo" (M-d) and type Enter to execute.

Reply via email to