@# 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 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38



Comments:

<0> any one here good with shell scripting? I wrote a simple script but it's not working the way I think it should and i could use some advice
<1> dingus9: you haven`t given us enaugh info to help you.
<2> For instance, kernel: RULE 21 -- DENY IN=eth0 OUT= MAC= SRC=192.168.2.04 DST=192.168.2.255 LEN=78 TOS=0x00 PREC=0x00 TTL=64 ID=2 DF PROTO=UDP SPT=36453 DPT=137 LEN=58
<0> redduck676: I can
<0> redduck676: let me past bin it
<3> dingus9: thats the general bcast rule
<3> u need to specify specific ports that samba uses
<3> and those are 137, 138, 139 and 445
<3> 137 and 8 are for nbns
<3> u might need port 135 aswell
<1> dingus9: any luck pastebin-ing it?
<0> yup http://pastebin.com/753086
<1> dingus9: you sure sh supports? '!=' inside []?
<1> (for strings)
<0> redduck676: no
<4> [ has to support it



<4> it's a command
<1> TheBonsai: even comparion of strings?
<1> *comparison
<4> STRING1 != STRING2
<4> the strings are not equal
<4> from man [. same for the builtin (bash)
<4> same for the POSIX description of [
<1> TheBonsai: yes, but he is scripting for sh.
<0> ic so test may not compare strings
<1> the same applies?
<0> would it be better to script for bash?
<1> dingus9: i didn`t sya it doesn`t. i am asking if it does.
<5> if you are using linux, sh is bash
<4> if you tell me, what sh is :> a bourne? a korn? zsh? something really POSIX compatible?
<5> ls -l /bin/sh
<5> lrwxrwxrwx 1 root root 4 Aug 25 2005 /bin/sh -> bash
<4> lgp-michael: an ***umption that can lead to unexpected results (hopefully not in a script that runs as root)
<1> TheBonsai: i meant bourne :)
<5> not an ***umption, unless the shell has been modified then it IS bash, it is bash for every linux distro, if it isnt its cos the admin changed it and if the admin changed it they deserve all they can get cos sh has a known set of functionality
<4> redduck676: bourne should support it, yea
<0> it should be bash
<4> lgp-michael: you ***ume that linux somehow magically depends on bash. that is what most distributors do, that's not a lawe
<4> *law
<1> dingus9: so what is the problem with your script?
<5> TheBonsai: No, sh is either bash or sh itself - bash when run with argv[0] as sh acts in a sh compatible way - sh is bash but without things like commandline CTRL P - the syntax for scripts is the same - if someone symlinks to csh or something - *it isnt sh - its broken by posix standard*
<4> lgp-michael: the only "law" here is that 1. /bin/sh actually exists and 2. it has a well-known behaviour. the rest is just linux-blabla.
<0> well as far as I can tell when I ./ it it works fine. but when acpi runs it it when I press my lid switch it doesn't do exactly what I wanted it to do.
<0> the script you see has some extra tests in it. my attempt at debug
<5> TheBonsai: exactly, it has a 'well known behaviour' - any system that changes it is broken, thats a posix fact
<4> lgp-michael: okay, i see you think that bash is the only XCU shell... could that be?
<5> XCU?
<4> oh, the next one that uses the term "POSIX" without ever looking at it
<4> forget it then.#
<0> the script is soposed to allow me to specifiy how long of a grace period I have between lid switch triggered and release IE (if I accedentally press the switch)
<1> lgp-michael: "any sytem that changes /bin/sh is broken" ???
<4> well, actually, the korn shell is (was) what comes closest to SUS' XCU i guess. but i don't really know for sure
<0> hey guys im on debian sid just to clarify 2.6.15.7 kernel
<6> hhmm...
<6> the edkscript can't find ircops of freenode
<6> just rizon
<0> redduck676: any sugestions, good tutorial, etc?
<1> dingus9: well, as far as bash goes there is a link to a good FAQ on /topic in #bash.
<6> the clones!
<6> aahh!
<0> ok
<1> i thinkk your problem has to do with how it is executed not what is in that script. i could be wrong tho.
<6> it's attack of thwe clones all over again
<0> redduck676: thanks
<7> anyone know an eazy way to convert a bunch of svgz to svg?
<8> list them out and gunzip them?
<9> svgz to svg like filez to file ?
<8> sare they all in the same folder?
<7> extract the svg from the svgz
<7> yes, all in same folder
<8> find . -maxdepth 1 -name '*svgz' | xargs gunzip
<8> that finds all svgz files in the current folder, and then runs gunzip on them
<7> cool, just what I need.
<7> Thanks
<8> learn about |, find, and xargs



<7> I know about | but not the other two.
<8> write it as a for loop, not sure it would be as nice
<1> han`: for i in *svgz; do gunzip $i; done :)
<4> it's nicer
<8> ls | grep svgz^ | gunzip
<8> heh
<8> err $
<8> yeah ok for loop works
<10> besides if there's an ls alias it would easily mess with that ls piping
<10> say, ls -lhaF
<8> no
<8> if you pipe ls, it does ls -1
<10> oh, never knew that
<10> well it doesn't for m, ls|more results in ls -lhaF output piped to more
<10> s/m,/me
<1> han`: why is the '^' there?
<10> redduck676: he meant $
<10> instead of the ^
<10> and it means the end of line
<1> lgp-michael: stupid question: why would you want '-F' option to ls if you are p***ing it to gunzip?
<8> it was missing $ and xargs, i wasn't being too serious
<8> helps to think of it in more than one way though
<8> you wouldn't
<5> redduck676: eh?
<5> redduck676: you wouldnt
<4> use ``command ls''
<1> lgp-michael: oops, that was eant to Lietu
<1> *meant
<5> redduck676: ahh {:-)
<11> Hello
<12> hi everyone
<11> Hi guys.
<12> ii have a problem getting my x server up this is my xorg.conf http://bigleo.dyndns.org/xorg.conf.log and this is the error i gets http://bigleo.dyndns.org/xorg.log ill be glade for any suggestions
<4> bin\bash: we can't read you. your client might be misconfigured, or you're not connected. stop yelling that you're here. it's useless.
<13> lala
<11> Anyone familiar with bash scripting in here that's willing to give me a hand?
<14> advanced bash howto @tldp.net
<4> i hate metaquestions.
<14> then give a meta-answer
<4> bin\bash: the reason for the script's failure is of course your CPU
<11> standard BOFH excuses won't work!
<4> Quiznos: i always wonder where that comes from? i never got an email with the text "do you mind if i write you an email?"
<4> pikacheeeeeeeeeeeeeeeeeee*cough*eeeeeeewwwww
<11> okay, here it is: http://pastebin.com/753145 -- I'm having an issue with this to take the user input of a $FILE to encrypt, and simply renaming it $FILE.gpg
<11> Someone help me out and I'll give you a cookie that won't expire until 2038 ;P
<4> bin\bash: what is the value of $FILE when FILEOUT is set? (hint)
<11> it's whatever the user inputs after the first prompt.
<1> hmmm, you are setting a value of fileout before you read balue of file.
<4> bin\bash: welcome to the world of a program FLOW from top to bottom
<4> bin\bash: ***uming FILE is unset or null when you invoke your script, FILEOUT is ".gpg"
<4> bin\bash: that was only the first look. you still didn't tell us what goes wrong. you just mentioned "i have issues" -> your CPU is broken!
<1> btw bin\bash read has -p.
<11> well when it tries to write the output as $FILEOUT plus the gpg extension (.gpg) it only tries to write .gpg as the output file... that's the issue.
<4> well, i explained the reason above
<1> bin\bash: both me and TheBonsai answer that.
<11> I need to know how to make line 4 work properly. some sort of {} [] () " " or whatever indicated $FILE + .gpg
<4> you use $FILE (what expands to the content FILE holds) in a time where FILE is unset or NULL, at least not specified
<1> bin\bash: you need to set fileout AFTER you read the value of file.
<11> Okay, then the issue of having $FILE + .gpg equaling $FILEOUT (ie $FILE = text.txt, therefor $FILEOUT = text.txt.gpg)
<4> the syntax is okay
<11> I've moved $FILEOUT after the line "read -e EID"
<4> just the place is not
<11> oh?
<11> Hold on a second then...
<4> FILEOUT="$FILE.gpg" - valid syntax
<11> yes I just discovered that.
<4> FILEOUT="${FILE}.gpg" - optcally tuned
<11> ah the $ goes OUTSIDE the brackets!
<11> geez
<11> BING!
<4> bin\bash: for more complex "issues", join #bash next time. 90% of this channel here give useless answers on most shell-related stuff


Name:

Comments:

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






Return to #linux
or
Go to some related logs:

eggdrop wait
data island in firefox
#css
ubuntu xgl taskbars disappeared
cannot create installation source yast
libc.so.6(GLIBC_2.4)(64bit) is needed suse
query 2 rows to 1
#debian
#math
#ubuntu



Home  |  disclaimer  |  contact  |  submit quotes