LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 02-21-2004, 03:09 PM   #1
nodger
Member
 
Registered: Oct 2003
Location: Ireland
Distribution: Slackware 9.1, Ubuntu
Posts: 192

Rep: Reputation: 30
Red face redirecting stderr


I need a quick way of redirecting stderr. im writing a cgi script so I have no terminal, and Im stuck on one seemingly simple line of code:

for (i=(23-hourstoshift); i>=0; i--) inhits[i+hourstoshift]=inhits[i];

its for a hit counter btw
 
Old 02-21-2004, 03:22 PM   #2
nodger
Member
 
Registered: Oct 2003
Location: Ireland
Distribution: Slackware 9.1, Ubuntu
Posts: 192

Original Poster
Rep: Reputation: 30
its OK, as usual , i figured it out just after I posted it to a forum!

I had declared i as an unsigned int, so when i decreased to -1 the program treated it as 2^32 and kept decreasing

D'oh!
 
Old 03-11-2004, 11:58 AM   #3
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,314

Rep: Reputation: 175Reputation: 175
FYI

bad_command 2> errfile
 
  


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
stderr is not a tty - where are you? lazyboy0001 Slackware 12 12-02-2005 10:44 AM
stderr messages bokini Linux - General 1 11-29-2005 08:30 AM
Redirecting error messages to stderr and file in Bash lowpro2k3 Programming 1 04-14-2005 07:47 PM
redirecting stdout and stderr to a file Avatar33 Programming 4 03-12-2005 08:55 AM
stderr is not a tty where are you? davidschob Slackware 6 10-31-2003 11:38 AM


All times are GMT -5. The time now is 05:55 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration