Computer Club MNNIT
Would you like to react to this message? Create an account in a few clicks or log in to continue.

write a command

4 posters

Go down

write a command Empty write a command

Post  Admin 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

https://computerclub09mnnit.forumotion.net

Back to top Go down

write a command Empty Re: write a command

Post  goldberg 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

Back to top Go down

write a command Empty Re: write a command

Post  Admin 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

https://computerclub09mnnit.forumotion.net

Back to top Go down

write a command Empty OOPS

Post  goldberg 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

Back to top Go down

write a command Empty Correct Answer

Post  ankitgr8 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

Back to top Go down

write a command Empty Re: write a command

Post  Gyanendra Sun Sep 07, 2008 8:21 am

who|tee file1 file2> /dev/tty

Gyanendra

Posts : 8
Join date : 2008-09-07

Back to top Go down

write a command Empty 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