LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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
 
LinkBack Search this Thread
Old 02-21-2004, 02: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, 02: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, 10:58 AM   #3
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,269

Rep: Reputation: 165Reputation: 165
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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
stderr is not a tty - where are you? lazyboy0001 Slackware 12 12-02-2005 09:44 AM
stderr messages bokini Linux - General 1 11-29-2005 07:30 AM
Redirecting error messages to stderr and file in Bash lowpro2k3 Programming 1 04-14-2005 06:47 PM
redirecting stdout and stderr to a file Avatar33 Programming 4 03-12-2005 07:55 AM
stderr is not a tty where are you? davidschob Slackware 6 10-31-2003 10:38 AM


All times are GMT -5. The time now is 09:25 AM.

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