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 03-08-2013, 01:40 AM   #1
cmt2013
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Rep: Reputation: Disabled
what is mean of exec 1


in my redhat server , a crontab script is below

exec 1> a.log
exec 2> b.log
script1
script2
script3
script4

what is the use of exec 1 ? thanks
 
Old 03-08-2013, 02:12 AM   #2
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
It is used to assign file descriptor i.e. fd to filename.

exec 1> is used to redirect standard output to a file named a.log.
exac 2> is used tp redirect standard error(s) to a file named b.log

Check this out here and here.

Last edited by shivaa; 03-08-2013 at 02:19 AM. Reason: Link added
 
  


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
exec {} \; ddaas Linux - General 3 02-05-2007 09:02 AM
exec cmd=perl... work but exec cgi doenst crions Slackware 5 12-09-2005 12:17 PM
c++ exec fosh Programming 2 07-04-2004 10:44 AM
cannot exec as person Linux From Scratch 5 12-19-2003 04:31 AM

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

All times are GMT -5. The time now is 08:54 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