Using Multiple Commands


Linux allows you to enter multiple commands at one time. The only requirement is that you separate the commands with a semicolon.

Want to see how long you have been online and open your Web browser at the same time? Just combine the date command with Mozilla's command.

date; mozilla; date

Remember that commands are case sensitive, so the command to start Mozilla must be in lowercase to start the browser.

[sam@halloween sam]$date; mozilla; date Mon Feb 7 13:26:27 EST 2000 Mon Feb 7 14:28:32 EST 2000 [sam@halloween sam]$

Running the combination of commands prints out the time and date, starts Mozilla, and then prints the time and date again after you close Mozilla. The discrepancy between the two results from the date command shows that you were using Mozilla for just over an hour.




The Red Hat Documentation Team - Official Red Hat Linux User's Guide
The Red Hat Documentation Team - Official Red Hat Linux User's Guide
ISBN: N/A
EAN: N/A
Year: 2002
Pages: 223

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net