|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Running two commands in one line
hi!
how do i run 2 command from the same line e.g: 'which screen' and then ls -la 'which screen' |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Code:
which screen; ls -la `which screen` |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
thank you. I will remember this the rest of my life
|
|
#4
|
|||
|
|||
|
I would like to know how can I write the output of these 2 commands into a file.I tried like
wc -l outfile2;du -sk outfile2>xyz.txt Then it is writing only the output of second command to the file. Without writing to a file, it is giving outputs of both correctly.Any thoughts? Last edited by abhilash_menon; 04-27-2009 at 10:53 AM.. Reason: Correction |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
Thanks.I got the same as
echo `wc -l outfile2; du -sk outfile2` > xyz.txt |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Running oracle commands Directly from Command Line | SkySmart | UNIX and Linux Applications | 4 | 05-11-2010 10:05 AM |
| For loop and running 2 commands at once? | Stephan | Shell Programming and Scripting | 5 | 02-26-2010 07:28 AM |
| Running sed commands | Dolph | Shell Programming and Scripting | 3 | 01-26-2010 06:39 AM |
| How to disable running commands from vi | Umesh_Sharoff | Shell Programming and Scripting | 1 | 07-14-2006 12:05 PM |
| running start up commands | skotapal | UNIX for Dummies Questions & Answers | 3 | 12-03-2002 06:31 AM |
|
|