LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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
  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
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
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,800
Blog Entries: 4

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


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:05 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration