| |
| |
| |
|
Page: 1 2 3 4 5 6
Comments:
<0> greycat, why not the info app? <1> wycats: the original, no. the second one, yes. <1> AnMaster: you have to ASK? <2> I get a too many arguments error <0> greycat, what is ASK? <1> then $PID doesn't contain a single numeric word. <0> oh hee <2> line 65: [: too many arguments <0> read it as an abbrev <2> I did PID=`/usr/bin/pgrep lighttpd || 0` <1> it probably returned multiple numbers. <0> then what is wrong with the info program? besides that it crash all the time? <1> it *crashes* too??
<1> that's a new one. I thought it just ****ed. <3> pinfo has never crashed for me <1> oh but wait, you're on Gentoo, aren't you... <0> yeah, if you press go back quite a few times <3> o wait, gentoo <3> haha@greycat <0> both on SuSE and Gentoo <2> so maybe pgrep lighttpd -n || 0? <1> wycats: how about you stop ****ing around and tell us what you're trying to do, or come up with something that's NOT just totally stupid?> <4> byz ves . <0> greycat, _sho_ ^ <1> what the hell is that || 0 doing there, anyway? <4> SHH................................... <5> obviously he has an app named 0 <0> yeah <2> ummm... why would you ***ume that I'm trying to do something stupid <2> I'm trying to fix a shell script for lighty <1> for starters, because you have "command || 0" <2> it wasn't working <1> for seconds, because you don't seem to realize what pgrep does. <0> then you need to install 0 <3> i think you want something like pid=$() || pid=X <0> and pgrep is just grep -P right? <4> intor <0> drak-angel, are you trolling? <1> for thirds (or was it zeroths?) you changed a perfectly valid question about -ne into -neq which is something totally bogus. <2> http://www.computerhope.com/unix/upgrep.htm <2> I read that <4> troing what <2> now I'm getting -neq: binary operator expected <1> wycats: it will return ALL of the matching PIDS. <4> trolling what <2> right <1> there can be more than one. <4> right what <2> but pgrep -n returns just the newest <1> wycats: because -neq IS ......... <1> *plonk* <2> I'm doing this: if [ 0 -neq $PID ]; then <0> -neq doesn't exist do it? didn't last I checked <4> anmaster what are you saying ?=/ <3> wycats, just use what i showed you <1> and I've said it at least twice now, possibly more. <0> drak-angel, you are saying odd things all the time, non relevant ones. like "SHH..................................." <2> greycat: re: more than one pid? <2> I already fixed that! <4> yea so and ...... <3> sigh. <3> wycats, im only going to say this once, and then im likely to scream at you with lots of profanity. <3> help test. -ne is valid. -neq is NOT valid. read http://tldp.org/LDP/abs/html/refcards.html#AEN16986 <3> use PID=$(pgrep lighthttpd)||PID=0
<2> this is by far the most angry, nasty irc channel I've ever been on -- I'm a newbie, not an idiot <1> and NEITHER ONE is going to help him compare an integer to a list of integers. <2> I'm already doing pgrep lighttpd -n <0> wycats, this channel expects you to RTFM <3> sorry use PID=$(pgrep -n lighthttpd)||PID=0 <4> AnMaster: and is the annoying you ? <2> which returns only one <2> I said that a while ago <3> let us know when you have read help test and the url you have just been provided <2> you ***umed I'm an idiot, so you stopped reading what I said <0> drak-angel, you makes no sense... ^_^ <4> yea i kind of don't do i m.m.m.m.m.m.m......... <2> sounds good... thanks for all your help <6> Hi! I have a file with one filename per line (names may contain spaces, files may be directories, files or symlinks), I want to create another file without directory names. any ideas about how to do a script? thanks! <3> pzn: use parameter expansion <3> man bash, search expansion <1> while read f; do [[ -d $f ]] || echo "$f"; done < oldfile > newfile <3> the short of it is ${i##*/} <1> is that what he meant by "without directory names"? <3> [[ -d? <0> _sho_, depends on if the names ends in / ? <1> I ***ume he wanted to remove the names that were directories. <4> mmmmm........ <3> anmaster, i dont know of any files that end in / <6> greycat, yes, that is what I meant <1> while read f; do [[ -d $f ]] || echo "$f"; done < oldfile > newfile <3> yeah, use greycats <0> _sho_, the names in the file may not end in / <6> ok. I understand about expansion between [[ and ]] <0> greycat, shouldn't you quote "$f"? oh wait it is [[]] <4> byz to samuel <4> samuel hi <3> hm, what if its suppsoed to be a directory, but doest exist, and doesnt end in / <7> _sho_: AFAIK as far as 'default' bash settings are concerned every dir name ends with '/' <4> wamty_: sup <8> this is a litle bit specific but... is there an easy way to email the standard out generated by running a script to a group of people only if the script succeded? If the script fails I'd like to send an email to a different group of people. I would preferably also like this to not use a temporary file if possible <6> greycat, thanks, it worked as expected! I tought about using xargs and had not success... your solution is very nice! <1> bbeck: capture it in a variable or a temp file, and then check the result code. <6> bbeck, make another script, that runs the first one, save output to /tmp/somefile and check $? (exit status), then based on it, call mail client <8> so the structure would look like: x=$(command); if $? == somethign then email group A else email group B fi? <4> maybe blah blah' <4> HELLO <7> bbeck: why not if command; ... <8> "email group A" and "email group B" will use $x in them <1> "$x" you mean. <7> ah <4> hi <4> wow <3> bbeck, use trap <9> greycat: is your solution portable? (the one you gave to pzn's question) <9> or is it just for bash? <4> BLAH BLAH BLHA <3> gc, banstick please <1> do I have to scroll back to find out what his question was or what I said to him? :/ <9> no <9> Solution: "while read f; do [[ -d $f ]] || echo "$f"; done < oldfile > newfile" <1> [[ is non-portable. you could use [ -d "$f" ] instead. <9> thanks <4> up <4> was up dude <9> drak-angel: can't you stop?
Return to
#bash or Go to some related
logs:
#qemu unmask mplayer-bin toshiba satellite 2455 ubuntu sendmail doesnt deliver to cyrus #linux #linux poweredge 830 debian lexmark z710 drivers ubuntu
#kde onchange input=hidden
|
|