| |
| |
| |
|
Page: 1 2 3 4 5
Comments:
<0> there's something simple here: /usr/local/sbin/server -d -q -xv 2>&1 > /tmp/output <--- why does that not redirect standard error into the file? <0> i used to know the answer to this.. :( <1> because the order matters <1> read redirections from left to right <0> it's >/tmp/output 2>&1 isn't it <2> hi guys, is there any way to make the bash pager more less-like? <1> 2>&1 >foo : redirect stderr to WHERE STDOUT GOES (terminal); redirect stdot to file foo <3> kothog, You're redirecting stderr to stdout and then redirecting stdout to a file. Should be the other way around <1> voidy: the bash pager? <1> voidy: ah, you mean for m***ive completion options and so? <0> ah, right. duh. thanks guys, much obliged. <2> or any options to stop you having to press enter and risk tapping enter on the half finished commandline that your tab-completing? <2> it's the only thing that drives me mad about bash hehe <2> aye yes <4> i can't seem to pad with zeroes on 'seq' command, AND, keep width to be 4 digits <4> -f and -w are mutually exclusive
<4> any tips? <5> !faqzero <6> http://wooledge.org/mywiki/BashFaq#faq18 -- How can I use numbers with leading zeros in a loop, e.g. 01, 02? <1> voidy: seems you can only switch on/off (readline: page-completions) <2> so i can just scroll back up the terminal to see the list rather than using a pager.. that works :) <1> heh <2> it'd be nice if you could pipe them to an external pager though <2> perfect <2> echo 'set page-completions off' >> ~/.inputrc <1> not really interesting <7> bah... whats the awk one-liner to add up a column again? <8> anyone need a script? <7> nvm found it in my #bash logs.. <7> Jun 30 15:19:13 <greycat> awk '{sum += $1; n++} END { print sum / n }' <1> that's the average value of the column 1 <7> oh yea... fixed ot gived sum.. <7> to* <7> heh.. #bash logs usually answer most of my issues... <1> naturally <8> naturwtf? <8> i used to answer day and night, now its more dead <1> "naturgemaess" <8> ts <1> GNAH <1> stop it <9> if, during the course of a script, it asks a question then waits for input... how do i automatically provide an answer? <1> type it <10> roostishaw, therei s an application scripting languge called expect you can use that does just that <11> roostishaw: in terminal: help read you could set read to timeout and set a var if it times-out <9> ok, i think thats what ill do, thanks! <12> I call a script in my bash_profile which is started as a background process. The script once invoked, sleeps for 60 minutes and then executes the main logic. The problem is that, once it is finished executing, any new shell then I open will start with a message "[1]+ Done script name". <12> How can I supress this message? Will starting the script as a sub-shall help? Now I invoke it as /path/to/script 2>/dev/null & . Will it help to invoke it as ( /path/to/script 2>/dev/null & ) ? <13> vishku: I am not sure. That message comes - I think - from some job control feature. Perhaps you can temporarily disable job control while you start the background script? <13> vishku: Or maybe you can first start a Bourne-shell (without job control) and have that put the script in the background? <12> MiniMax: Thanks, but I do not understand what you meant by job control feature. Is there some setting that I can change? <12> MiniMax: Did a google. Do you mean commands like disown.. OK I was not familiar with the term <13> vishku: Neither was I. I will go look at it. Thanks. <13> vishku: disown sounds like a good candidate. <12> MiniMax: I gave the entry like this : ( ~/bin/test 2>/dev/null & ) >/dev/null <12> That seems to do it.. No status messages <12> But I guess your idea about modifying job control settings seems to the correct path to take <12> Anyway Thnaks much for your attention <14> I am trying to limit the options a user can select to options 1 - 4 or q to quit the program. I have: read ans; while [ "$ans" != "q" -a "$ans" < 1 -o "$ans" > 4 ]; do; echo You must choose an option from 1 - 4 or q to quit.; read ans <14> Can anyone tell me the correct way of doing this ? <1> not > < <1> -lt (less then) and -gt (greater then) <1> [ is a normal command. and > means redirection. [ foo > bar ] will break into [ foo, redirect to bar and a useless ] <1> i remember your nick from somewhere... <1> #linuxhelp? <1> yep. <14> Yes, I'm still there too <14> read ans; while [ "$ans" != "q" -a "$ans" -lt 1 -o "$ans" -gt 4 ]; do; echo You must choose an option from 1 - 4 or q to quit.; read ans <14> Your right, I changed it to be like above. <14> but now it's expecting an integer. <14> I need the q option and 1 - 4. <15> anyone know fcron well? <1> seth1248: also i'd use a combination of a normal test and the bash arithmetic. try if `` while [ "$ans" != q ] && ((ans < 1 && ans > 4)); .... '' works <1> Music|: never heard before. what's that?
<15> its basically a version of cron <15> works with crontab, etc. <1> what's the diff? <1> i.e. what can it do what vixie's cron can't? <15> "But fcron does not ***ume that your system is running neither all the time nor regularly : you can, for instance, tell fcron to execute tasks every x hours y minutes of system up time or to do a job only once in a specified interval of time" <16> Translation... it's anacron. <1> sounds like <15> "contrary to Vixie Cron, fcron does not need your system to be up 7 days a week, 24 hours a day : it also works well with systems which are not running neither all the time nor regularly (contrary to anacrontab)." <15> it works the sae really <15> same* <16> Ah, written by someone who has no actual experience with anacron. <15> theres a "fcrondyn" function that allows you to see dynamically what jobs are scheduled <1> neat <16> Music|: So, why would you replace regular cron with this? Doesn't seem to be much point to it. <15> let me quote the rest...sec <1> maybe he has a backup job on a backupserver which isn't always running (if such a thing makes sense at all) <15> from what I gleaned, its good for scripting <1> what do you need from fcron? <15> although I dont know how it could better than crontab -l <15> well a a few systems Im maintaining were loaded with Trustix, which came with the fcron <1> ah, as the standard cron service <15> none of the cronjobs are running <15> not even roots daily, etc scripts <15> I know this because 1...they arent running....2...Im using the fcrondyn script and it shows 0 jobs <15> reloading several OS's is not an option..so Im trying to troubleshoot it <15> restarting fcron service is a no go <1> and it doesn't read the common crontab syntax? <15> Ive tried all the basic crap <1> .oO(logfles) <15> it has its own syntax <15> but if you do a crontab -e to edit, it links to fcrontab -e <15> It seems to be entwined in cron <15> so im baffled lol <15> If it was regular crond, and jobs werent running although the daemon was up...what would u do? <1> looking into my logs <15> k <15> what ****s is because of security concerns I cant even stick atd on this thing <15> so I have a few scripts which I need to daemonize on each server, and I cant reload em :/ <17> hello <1> y0 <17> i have man -t xinetd > xinets.ps <17> and i want to convert xinetd.psd to pdf using ps2pdf <17> in single line ? <17> man -t xinetd > xinet.ps > ps2pdf <17> that didnt work <1> | ps2pdf - >foo.pdf <1> the - might not be needed <1> just try <1> your basic mistake was to mix up a pipe | with redirection > <17> man -t xinetd > xinet.ps | ps2pdf > xinet.pdf ? <17> u mean <1> man .. | ps2pdf >foo.pdf <1> >xinet.ps will ALWAYS redirect to a file "xinet.ps" <1> and you want it as input for the next program <1> that's the pipe <1> foo | bar | baz | meow >final_output.txt <17> man -t xinetd outputs(>) xinetd.ps <17> i want the output of that to be input of ps2pdf <1> that's what a | does <1> man -t xinetd | ps2pdf <1> and i see that ps2pdf is a ****ty tool <1> it wants filenames <17> yeah <1> "-" is the filename usually used for stdin (by convention) <1> ps2pdf - output.pdf <1> so, man -t xinetd | ps2pdf - xinetd.pdf <1> should work <1> (ps2pdf has a manpage, the - is mentioned there) <17> that didnt <17> umm lemme try that again <1> it did here <17> yup it did <1> mainserver:/home/bonsai/tests# man -t test | ps2pdf - test.pdf <1> mainserver:/home/bonsai/tests# file test.pdf
Return to
#bash or Go to some related
logs:
#perl vmware FreeFontPath: FPE /usr/share/fonts/misc refcount is 2
#web mdb2 composite key #perl #linux #web gentoo bin login #ubuntu #linux
|
|