You are not logged in.

#1 2009-12-11 22:59:28

DarksideEE7
Member
From: Arkansas, United States
Registered: 2009-06-06
Posts: 356

Can't redirection output of daemon to a text file

I'm just trying to save some data from the command:

sudo /etc/rc.d/laptop-mode status

using

sudo /etc/rc.d/laptop-mode status > ~/lapstatus.out

I am able to pipe the stdout to less easily using:

sudo laptop-mode status |less

I'm not getting anything but a 2 byte file that's empty. 

I'm sure I'm missing something obvious, so if anyone has any suggestions feel free to enlighten me.

Offline

#2 2009-12-11 23:08:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Can't redirection output of daemon to a text file

I would try

cat /etc/rc.d/laptop-mode status > ~/.lapstatus.out

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2009-12-11 23:13:48

DarksideEE7
Member
From: Arkansas, United States
Registered: 2009-06-06
Posts: 356

Re: Can't redirection output of daemon to a text file

jasonwryan wrote:

I would try

cat /etc/rc.d/laptop-mode status > ~/.lapstatus.out

Actually catting out the daemon huh?  Well I suppose it's worth a shot.  Let me try.

Well no, just as I suspected it actually cats the code out (not the output of the program) in that case.

Last edited by DarksideEE7 (2009-12-11 23:14:34)

Offline

#4 2009-12-11 23:19:16

DarksideEE7
Member
From: Arkansas, United States
Registered: 2009-06-06
Posts: 356

Re: Can't redirection output of daemon to a text file

Ah, figured it out.  You gave me an idea.............I redirected stdout to cat:
sudo laptop-mode status |cat > ~/laptop.out
Worked like a charm.  I'm not sure why simple redirection didn't work, but oh well.

Offline

#5 2009-12-11 23:26:36

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Can't redirection output of daemon to a text file

Sweet: 'cause I had nothing else... smile


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2009-12-11 23:39:42

DarksideEE7
Member
From: Arkansas, United States
Registered: 2009-06-06
Posts: 356

Re: Can't redirection output of daemon to a text file

BTW have you tried that package on your eeePC?  I just installed it and it helps quite a bit on battery consumption.

Offline

#7 2009-12-11 23:42:05

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Can't redirection output of daemon to a text file

Yes - it's a terrific package.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2009-12-11 23:45:35

DarksideEE7
Member
From: Arkansas, United States
Registered: 2009-06-06
Posts: 356

Re: Can't redirection output of daemon to a text file

I agree.  I saw that dwm link in your sig....I've seen others running it as well.  I'm going to check it out.

Offline

#9 2009-12-11 23:52:56

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Can't redirection output of daemon to a text file

I didn't think it would be all that great on the Eee (I was using Openbox). But now I love it: takes up hardly any space, uses maximum screen real estate and allows you to customize exactly how all apps behave. Brilliant!


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2009-12-12 00:13:37

DarksideEE7
Member
From: Arkansas, United States
Registered: 2009-06-06
Posts: 356

Re: Can't redirection output of daemon to a text file

I won't be using it as my primary DE, as I use KDEmod and absolutely love it.  However I love to test out new DEs, so I'm going to check it out.

Offline

#11 2009-12-12 12:18:24

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: Can't redirection output of daemon to a text file

DarksideEE7 wrote:

Worked like a charm.  I'm not sure why simple redirection didn't work, but oh well.

I could be wrong but maybe it's something to do with coloured output? Anyway nvm.


"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page

Offline

Board footer

Powered by FluxBB