Pipe Apropos to Newfile
K, I am stuck on my teachers 2nd question. I have 10 tabs open and none of them are helping get the answer.
He wants me to run the command $ apropos calendar here is the output Code:
Curses::Widgets::Calendar (3pm) - Calendar Widgets I created the newfile folder, but every command I have tried is just renaming the folder and not actually putting the contents of calendar into the newfile. I am using cat ls touch mv but none of these are actually taking the output of calendar and inputting them into newfile.:doh: He wants us to use the info and man pages to figure out to do it, but they aren't helping, or I do not see where the answer is. Can anyone give me better direction before I just email him? |
If you want to put the output of a command into a file you have to use redirection.
|
Yeah, thats actually in the question:
Quote:
or replace cat with mv, cp, touch, etc? Because those arent working and I literally have about 9 tabs open and I cant seem to get it. |
You want to redirect the output of the command
Code:
apropros calendar Here seems to be a misunderstanding. To create a new file (the file doesn't have to exist for a redirection) and put the content of stdout into it all you need is the >-sign. For example: Code:
ls > test |
Code:
apropos calendar > Newfile |
Quote:
Also, thanks Tobi as well. |
Moved: This thread is more suitable in Linux-Newbie and has been moved accordingly to help your thread/question get the exposure it deserves.
|
You may find these worth bookmarking
http://rute.2038bug.com/index.html.gz http://tldp.org/LDP/Bash-Beginners-G...tml/index.html http://www.tldp.org/LDP/abs/html/ |
redirection (| > >>)
What course are you on and what does it cost? There are many and many take the micky on cost.
Fred. |
All times are GMT -5. The time now is 09:53 AM. |