write a command

Go down

write a command

Post  Admin on Fri Sep 05, 2008 11:03 pm

How can I arrange to have output go two places at once,
e.g. to the screen and to a file? give a command for this?

Admin
Admin

Posts : 39
Join date : 2008-08-03

View user profile http://computerclub09mnnit.forumotion.net

Back to top Go down

Re: write a command

Post  goldberg on Sat Sep 06, 2008 5:26 am

cat | cat > file will result in input going to stdout as well as filenamed file

goldberg

Posts : 8
Join date : 2008-08-11

View user profile

Back to top Go down

Re: write a command

Post  Admin on Sat Sep 06, 2008 6:41 am

dear gold berg just try it the command you have written on shell is it working .........
if you have not understand the question please ask me.......... Very Happy

Admin
Admin

Posts : 39
Join date : 2008-08-03

View user profile http://computerclub09mnnit.forumotion.net

Back to top Go down

OOPS

Post  goldberg on Sat Sep 06, 2008 11:16 am

Sorry I misinterpreted the question
I will try it if possible
Actually what I wrote will first ask me for Input(simultaneously write it to screen) and then just copy what I wrote to the file
(Please Correct me if I am still wrong)

goldberg

Posts : 8
Join date : 2008-08-11

View user profile

Back to top Go down

Correct Answer

Post  ankitgr8 on Sun Sep 07, 2008 8:13 am

Suppose u wish to see the output of 'who'
who | tee file

ankitgr8

Posts : 6
Join date : 2008-08-11

View user profile

Back to top Go down

Re: write a command

Post  Gyanendra on Sun Sep 07, 2008 8:21 am

who|tee file1 file2> /dev/tty

Gyanendra

Posts : 8
Join date : 2008-09-07

View user profile

Back to top Go down

Re: write a command

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum