LinuxQuestions.org
Help answer threads with 0 replies.
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 10-08-2012, 10:41 AM   #1
penguinlover2
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Rep: Reputation: 0
redirection question


Hi

I am reasonably familiar with the redirection syntax such as 2>&1
but recently I have come across a variant in a crontab that I cannot work out (googling and looking at bash developers guides hasn't helped either so far) it is this

00 12 * * * csh -c '/path/to/my/script.ksh >&! mylog.log

what does the >&! redirect do?

thanks
 
Old 10-08-2012, 11:16 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946
Since the shell is csh, it's no wonder. The c-shell series is quite different in many ways from bourne-based ones like bash. It may be some kind of argument expansion or something.

What's really strange to me is that the person used csh in order to execute a ksh script. Why not just execute it directly?

And if he has ksh available, why isn't he using it instead, considering all the weaknesses the c-shell has?

Last edited by David the H.; 10-08-2012 at 11:18 AM. Reason: minor rewording
 
1 members found this post helpful.
Old 10-09-2012, 07:27 AM   #3
penguinlover2
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by David the H. View Post
Since the shell is csh, it's no wonder. The c-shell series is quite different in many ways from bourne-based ones like bash. It may be some kind of argument expansion or something.

What's really strange to me is that the person used csh in order to execute a ksh script. Why not just execute it directly?

And if he has ksh available, why isn't he using it instead, considering all the weaknesses the c-shell has?
thanks the csh pointer was the clue, its a form of csh redirection (which is different to bash),
for anyone else searching for this there is more reference on csh redirection here:

http://www.mathinfo.u-picardie.fr/as...direction.html

and the answer to my specific question is:
>&! means Redirect standard output and standard error; overwrite file if it exists

atb
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about ip/port redirection rvn2k2 Linux - Networking 12 02-02-2010 07:56 PM
Redirection question mortonmorton Linux - Newbie 7 10-07-2009 12:55 PM
Bash Redirection question jcllings General 5 08-26-2009 10:10 AM
Redirection question ShaqDiesel Linux - General 3 01-06-2009 05:41 PM
Redirection question... Zeracles *BSD 0 02-21-2004 11:11 AM


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