3

I am very new to bash scripting and in Ubuntu\Debian package system.

Today I am studying the content of this preinst file that the script executes before that package is unpacked from its Debian archive (.deb) file.

My fist doubt is about a line containing this:

!:-

Probably it is a stupid question but, using Google, I can't find an answer.

Gerald Hughes
  • 5,771
  • 20
  • 73
  • 131

1 Answers1

3

Insert the last command without the last argument (bash)

/usr/sbin/ab2 -f TLS1 -S -n 1000 -c 100 -t 2 http://www.google.com/

then

!:- http://www.stackoverflow.com/

is the same as

/usr/sbin/ab2 -f TLS1 -S -n 1000 -c 100 -t 2 http://www.stackoverflow.com/
Gerald Hughes
  • 5,771
  • 20
  • 73
  • 131
  • 2
    `!:-` is one of the so called *history interaction commands*. Check the manual to learn all that goodies: https://www.gnu.org/software/bash/manual/html_node/History-Interaction.html – hek2mgl Apr 01 '15 at 13:12