@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9



Comments:

<0> yep
<1> ok, paste it
<1> *g*
<1> xaez: just paste it ehre
<1> here*
<0> http://novak.no-ip.org/bash.txt
<2> ewww, mac line endings.
<0> sorry :-(
<1> twkm, you stop making girly "ewww"'s.
<1> :)
<2> for d in "$TESTINGDIR"/*; do ...
<2> $[] is deprecated, use (( )) or $(( )).
<1> ((i++)
<1> )
<0> ahh, i just found that on a tutorial because my ye old c i++ didnt work



<1> :)
<0> thats not the problem though :(
<2> let i++, ((i++)), i=$((i+1)), i=$(expr $i + 1)
<2> change your for to use what i showed.
<1> twkm: you don't say that in front of greycat
<1> :P
<0> ok thanks!
<2> VIm_Enforcer: eh? say what?
<1> let i++, ((i++)), i=$((i+1)), i=$(expr $i + 1)
<0> the problem i am having is when i run the script, i get the two directories listed in the LIST variable, but then the remaining echo's appear after the listed directories
<1> greycat would say,
<1> JUST USE (()) DAMMIT
<2> xaez: since $d has $TESTINGDIR already in it be sure to use just "$d/run.sh" later.
<0> it doesnt make sense because i thought everything in the do; done block would be executed together so i have a consistant $d varabile
<2> i would even be tempted to do: for run in "$TESTINGDIR"/*/run.sh; do ... "$run" ...
<0> hmm
<2> btw, why do you run uninstalled script source?
<2> VIm_Enforcer: he might. feel free to check with him.
<0> u mean im missing the she-bang?
<3> Anyway, can anyone answer my earlier question? I basically need to chop off the first two lines of a program's output.
<1> xaez: yea
<0> i just pasted the part of the code thats giving me problems
<1> deitarion: head
<0> the top has the #!/bin/sh
<1> xaez: use bash
<2> xaez: then why name them with .sh?
<0> easy to identify when i do an ls?
<3> VIm_Enforcer: According to the docs, it would only be useful if I wanted to chop off the LAST two lines, not the first.
<3> ...and tail seems to lack an equivalent option.
<1> deitarion: sed 1,2d
<0> when the ls $TESTINGDIR runs, it only returns the folders in that path, i then want to execute each script with a fully specified pathname (dont ask why, i just like it better :-) )
<1> sed '1,2d'
<3> Thanks.
<0> that is why i do: "$TESTINGDIR"/"$d"/run.sh
<2> *shrug*
<2> i asked about the .sh part, not the whole thing.
<4> cu
<0> ahh ok, fair enough
<2> do you also name your binaries .bin or .exe or something?
<0> refresh that file
<3> Hmm. That seems to kill the newlines.
<2> what if run.sh in one directly needs to be changed to perl, will you fix your loop to handle run.pl too?
<0> you can see the output it produces when its finished running.. is that normal?
<3> Ok, got it.
<3> Just a syntax mistake
<1> deitarion: you're welcome
<0> twkm - i will only ever be using bash scripts. but i see your point
<0> its merely a quick script to auto-generate some results for my research at uni
<2> xaez: so, i refereshed and it seems you ignored everything i said, so i'm going to take my marble somewhere else.
<0> hence quick whip-up script
<0> twkm - i updated the file with the output, that is still the old text from before
<0> its easier to echo "" >> to a file rather than vi the file and paste etc
<1> xaez: at times
<0> besides, you fail to see the issue i am having. It was a pretty simple question, but now your correcting my code. Its not the final code, i just want to get the for loop working.
<2> yes, i ****. i'll just /ignore now and save us both the grief.
<0> fair enough
<0> is there anyone who isnt arrogant who can help me please?
<1> what do you need again xaez ?
<0> VIm_Enforcer: i dont suppose you are able to help me? Any help is appreciated.
<2> not any help, certain help. be wary.
<5> xaez, go ahead twkm can be a real prick at times.



<0> *sigh*
<1> xaez: oh, so you don't suppose i'm able to help you.
<1> ok.
<0> http://novak.no-ip.org/bash.txt
<2> he sighed because i haven't quite set the ignore yet.
<1> why don't you fix that yourself?
<0> look at the output based on the script, i cant work it out?
<1> if you mouth ppl who try to help you?
<0> well i am standing up for myself, as opposed to insulting a person who asked a simple question
<0> i asked a question, i was insulted for my poor code and still didnt get any help from twkm. What do you expect?
<1> xaez VIm_Enforcer: i dont suppose you are able to help me? Any help is appreciated.
<1> if you don't suppose i'm able to help you
<1> seek help elsewhere
<0> so how is you not helping me helping me? "Any help is appreciated."
<1> btw, twkm hada a point
<0> that makes no sense at all
<0> which was?
<1> "$TESTINGDIR"/*
<1> not using ls
<0> yes, indeed he did about that. but there is 100 different ways of doing things. Regardless, that wasn't the reason i came in here asking for help.
<2> xaez: if you would have done what i suggested you would already be done, the problem fixed, and you could go on with your life. instead you insist that, ignorant of what is happening yet you still know i cannot have provided a useful bit of information. i feel sorry that you feel i insulted you, though i do not agree. yet now i will, because you are obviously a turd.
<2> hint: is there a newline in LIST? if so does it still exist when you do "$LIST"?
<2> pop quiz: if you replace "$LIST" with a glob will that problem go away?
<0> ok twkm, i tried your way and it worked. I must have missed that line earlier. I appologise about being rude.
<1> twkm: 1 xaez: 0
<0> indeed, although i am a bash newbie so that isnt any surprise really.
<1> xaez: http://tldp.org/LDP/abs/html/
<1> helps a lot
<6> hi there. got a simple question I'm failing to work out: how do I sum up stdout of different commands and pipe the whole thing to gzip?
<6> like date && echo "---------" | gzip file.gz
<6> that will pipe only the echo to gzip
<1> spike: {}
<1> { cmd1 cmd2 } > file
<6> oh, subshells
<0> VIm_Enforcer: thanks, it turns out If was using a different tutorial on the same domain.
<1> f/ example
<1> spike: not subshell
<0> I*, not If
<1> subshell is () :)
<6> eer, true
<1> xaez: read this one then
<0> ta
<1> spike: besides, how come gzip works without "-"?
<2> though either works for that.
<1> twkm: true
<6> VIm_Enforcer: mmmh, that gives me a > like I had an open '
<6> { date && echo '--------' } > file
<1> spike: pardon me?
<6> if I execute that command I get a > prompt, like I had to complete something
<2> { ... ; }
<2> ; is not optional.
<1> twkm: thanks twkm :)
<2> { cmd1; cmd2; cmd3; ...; } | gzip > file.gz
<6> oh, ta
<2> also, gzip > file.gz < <(cmd1 ; cmd2 ; cmd3)
<1> twkm: that's process redir
<1> oh
<1> sorry
<1> i thought we're talking file redir
<2> true. just an alternative for spike to consider.
<1> haha, true UNIX way.
<2> ''foo | bar'' is similar to ''bar < <(foo)'', and even ''var=$(foo); bar <<< "$var"; unset var''.
<2> the last is too risky, if there is too much output it could crash the shell.
<6> eeer, damn, I'm cluesless :(. can understand the {} thing but cant really get the < <(foo) and the <<< bit
<6> and why the double ''
<6> anyway, I'll look it up on abs, tnx again
<2> i use ''s to surround the commands i produce when they are within text, so people don't have to worry where the command ends and the words begin again.
<2> also, if people type the ''s it shouldn't interfere with the command within.
<8> `` '' (where did i get that from? bash manpage? dunno.
<2> i used to use ``'' because that is indeed the usual plain-text quotes used by nroff.
<2> but it does have issues with bash, so i switched to just '' ''.
<8> twkm: well, it's simply wrong to copy&paste that stuff at all ;)


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #bash
or
Go to some related logs:

install snd_hda debian
ubuntu Coro perl
rtl8169 knoppix
debian imapd Login disabled user=
kids box torrent
#linux
autologin with Knetworkmanager
colinux xserver-xorg
rmdir tws
where is _elf_lib



Home  |  disclaimer  |  contact  |  submit quotes