help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] How to use !! in a script?


From: Greg Wooledge
Subject: Re: [Help-bash] How to use !! in a script?
Date: Mon, 11 Apr 2016 08:28:05 -0400
User-agent: Mutt/1.4.2.3i

On Sat, Apr 09, 2016 at 06:12:20PM -0500, Peng Yu wrote:
> Does anybody know
> what is the correct way to use !! in a script? Thanks.

You don't.  Why would you ever use that in a script?

If for some reason you want to run the same command two times in a row,
you can simply copy and paste the command.  If you want to run it a
whole bunch of times in a row, wrap it in a for or while loop.

for i in {1..10}; do
  some really long command that you want to run 10 times in a row
done



reply via email to

[Prev in Thread] Current Thread [Next in Thread]