Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


Search this Thread
Old 02-23-2013, 08:23 PM   #1
LQ Newbie
Registered: Feb 2013
Posts: 3

Rep: Reputation: Disabled
redirecting calendar output to a different file

I am working my way through the Linuxzoo tutorial & have having a little trouble figuring out how to redirect the output of the cal command so that the calander for a certain year is saved to a file called "yearfile" in the home directory of demo. I've tried copy & creating a directory for yearfile, but keep getting error messages. I'm getting very frustrated & would appreciate any help.
Old 02-23-2013, 08:49 PM   #2
Senior Member
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 3,438

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Like this?
cal -y > yearfile
Old 02-23-2013, 08:49 PM   #3
Senior Member
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,797
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Can you try:
[user@example]~$ cal 2013 > ~/yearfile.txt


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirecting exact output to a file sanaz Linux - Newbie 13 02-20-2013 07:21 AM
Redirecting one output to another file amjadask Linux - Server 3 02-14-2011 12:21 PM
Redirecting socket output to a file elmafiacs Programming 1 10-15-2005 06:18 AM
Redirecting colsole output to file. danimallv Linux - General 4 07-05-2005 03:44 PM
redirecting output of compile to a file halfcan Linux - Hardware 1 02-05-2005 11:01 PM

All times are GMT -5. The time now is 11:39 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration