LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
LinkBack Search this Thread
Old 02-23-2013, 07:23 PM   #1
bstar1019
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, 07:49 PM   #2
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,414

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

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


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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


All times are GMT -5. The time now is 01:25 PM.

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