Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 02-21-2004, 03:09 PM   #1
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
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

Old 03-11-2004, 11:58 AM   #3
Senior Member
Registered: Mar 2004
Location: england
Distribution: Debian, Mint, Puppy, Raspbian
Posts: 3,371

Rep: Reputation: 192Reputation: 192

bad_command 2> errfile


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 06:06 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration