Whats the equivalent to Windows’ pause command? This suspends the running commands and says ‘press any key to continue’. Is there a Linux equivalent?
I do not know anything about Windows, but reading the rest of your question I guess you mean waiting inside a script (that runs in a terminal/console) until one types a RETURN.
Use the **read **statement:
ls -l
read
pwd
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
And it’s probably worth mentioning that *nix also has ‘sleep’ which
accepts a time limit for pausing so you can also move along without
necessarily waiting forever.
Good luck.
hcvv wrote:
> I do not know anything about Windows, but reading the rest of your
> question I guess you mean waiting inside a script (that runs in a
> terminal/console) until one types a RETURN.
> Use the *read *statement:
>
> Code:
> --------------------
> ls -l
> read
> pwd
> --------------------
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIse2Y3s42bA80+9kRAoTMAJ4oAZAqF57MF7AjwENqzP2EddTxTACfX9M5
+hInLhH2qKOGj4r9X4oxRPc=
=fCAN
-----END PGP SIGNATURE-----
On Sun, 24 Aug 2008 23:24:08 GMT
“ab@novell.com” <ab@novell.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> And it’s probably worth mentioning that *nix also has ‘sleep’ which
> accepts a time limit for pausing so you can also move along without
> necessarily waiting forever.
>
> Good luck.
>
>
>
>
>
> hcvv wrote:
> > I do not know anything about Windows, but reading the rest of your
> > question I guess you mean waiting inside a script (that runs in a
> > terminal/console) until one types a RETURN.
> > Use the *read *statement:
> >
> > Code:
> > --------------------
> > ls -l
> > read
> > pwd
> > --------------------
> >
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFIse2Y3s42bA80+9kRAoTMAJ4oAZAqF57MF7AjwENqzP2EddTxTACfX9M5
> +hInLhH2qKOGj4r9X4oxRPc=
> =fCAN
> -----END PGP SIGNATURE-----
the ‘read’ builtin of bash also has an option ‘-t’ which specifies how long
to wait before returning failure.
read -t 10
would wait 10 seconds
Loni
–
L R Nix
lornix@lornix.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Great info… thanks Loni.
Good luck.
L R Nix wrote:
> On Sun, 24 Aug 2008 23:24:08 GMT
> “ab@novell.com” <ab@novell.com> wrote:
>
> And it’s probably worth mentioning that *nix also has ‘sleep’ which
> accepts a time limit for pausing so you can also move along without
> necessarily waiting forever.
>
> Good luck.
>
>
>
>
>
> hcvv wrote:
>>>> I do not know anything about Windows, but reading the rest of your
>>>> question I guess you mean waiting inside a script (that runs in a
>>>> terminal/console) until one types a RETURN.
>>>> Use the *read *statement:
>>>>
>>>> Code:
>>>> --------------------
>>>> ls -l
>>>> read
>>>> pwd
>>>> --------------------
>>>>
>>>>
> the ‘read’ builtin of bash also has an option ‘-t’ which specifies how long
> to wait before returning failure.
> read -t 10
> would wait 10 seconds
> Loni
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIssog3s42bA80+9kRApaxAJ9qmBOOrtrld6TethsgFokNSVlhhwCfZSNN
2NiTJmO9+9Kcudd8vrZxaXY=
=UJmo
-----END PGP SIGNATURE-----