| |
| |
| |
|
Page: 1 2 3 4 5
Comments:
<0> ah no... it was a standard irc msg on quit :I <0> nevermind then.. <1> Hi there, I am trying to work out the string match syntax if I have a string "--action", trying to match the string with this syntax "string match --{a-z}* $action" I know its wrong but how do I check if it has a a-z* after --? <2> row_ you could use regexp <2> ;set action "--action" <3> Robb`: #435 (177 clicks) Tcl: --action <2> ;regexp -all {--[ <2> wops <1> Robb its not just for action you see, I am trying to check syntax of the cmd is correct you see <2> I know <1> I was told to try keep away from regexp, so thats what I am doing :/ <2> ah <2> you cant do that with string match tho <1> told its best to not use them if you don't have to. <1> so I am not <1> Matches any character in the set given by chars. If a sequence of the form x-y appears in chars, then any character between x and y, inclusive, will match. When used with -nocase, the end points of the range are converted to lower case first. Whereas {[A-z]} matches '_' when matching case-sensitively ('_' falls between the 'Z' and 'a'), with -nocase this is considered like {[A-Za-z]} (and probably what was meant in the first place).
<1> docs say I can :/ <2> eh <2> ;string match {a-z} "a" <3> Robb`: #446 (373 clicks) Tcl: 0 <1> and if you use [] get cmd unknown error :( <2> thats what iam telling you <2> you cant <1> silly docs <2> ;string match {[a-z]} "a" <1> :/ <3> Robb`: #451 (391 clicks) Tcl: 1 <2> oh <2> lol <1> wtf <1> tclsh errored me on that <1> ! <2> ;string match {--[a-z]} "--action" <3> Robb`: #458 (397 clicks) Tcl: 0 <2> ;string match "--{[a-z]}" "--action" <3> Robb`: #459 (3478 clicks) Tcl error: invalid command name "a-z" <1> see <2> ;string match {[a-z]} "--action" <3> Robb`: #461 (436 clicks) Tcl: 0 <2> :s <1> :/ <1> tcl is nice and simple yet complex :P <2> ;regexp -all {--[a-z]} $action <3> Robb`: #465 (448 clicks) Tcl error: bad switch "--[a-z]": must be -all, -about, -indices, -inline, -expanded, -line, -linestop, -lineanchor, -nocase, -start, or -- <2> ;regexp -all "--\[a-z\] $action <2> wtf <1> that would not work, your escaping the required [] for a pattern are you not? <2> ;regexp -all {1} 1 <3> Robb`: #467 (569 clicks) Tcl: 1 <2> row_ iam escaping it so the tcl interpreter doesnt interpret it :P <1> :P <2> because its a range thingie in regex <1> ;regexp -all "--\[a-z\]" $action <3> row_: #471 (483 clicks) Tcl error: bad switch "--[a-z]": must be -all, -about, -indices, -inline, -expanded, -line, -linestop, -lineanchor, -nocase, -start, or -- <2> ;regexp -all "\-\-\[a-z\] $action <4> anyone use linux? <1> smokey: yes. <2> ;regexp -all {\-\-[a-z]} $action <3> Robb`: #474 (17467 clicks) Tcl: 1 <2> see <1> Robb your not closing your "? <4> are you into devlopment? <2> row_ :) <1> smokey: into nix dev or into general dev? <4> nix. like shell scripts <1> Robb`: thanks :) <2> ;regexp -all {\-\-[^a-z]} "--action" <3> Robb`: #481 (673 clicks) Tcl: 0 <2> row_ np :) <4> i'd like to test my script. but the user must have root, since its a data info script. <1> ah bash, I can do some bash but don't really do much of it <1> smokey er sounds suspect ;) <4> oh, i made it, but i want a second idea on it, like if the output is good looking and what not. <4> oh you can view the SRC. <1> pastbin it and I will take a look if you want and run if it does not look suspect <4> its not a compiled binary. <4> oki.
<1> smokey: you can't compile bash ;) <1> well not that I know of <4> crap. you cant use it, it will only work if you use IPv6 so it can DNS, and if you have a dev device named 'sixbone' <4> lemme paste a complete command output. <1> you can still check ipv6 dns without ipv6 setup. <1> Robb`: so I must use regexp I take it then only option? <4> you have to have ipv6 enabled first. <1> thats well odd those docs should be corrected <4> http://juggalo.be:81/pastebin/show?=28 <1> I have it enabled, debian default <4> most are these days :P <1> smokey: The requested URL /pastebin/show was not found on this server. <2> row_ yea =) <1> show.php? <1> show.cgi? <4> ah crap <4> nah. <4> http://juggalo.be:81/pastebin/index.php?show=28 <4> the eggurl is messed up lol <4> glad you said something ;] <1> smokey: so what part of this am I looking at and what am I looking for? <4> is the display "easy reading" <1> ish I am not 100% sure what the eggdrop bitchx etc stats mean but I get the rest I suppose <1> they are too low to be pids <1> so status, amount of procs running those cmds? <1> otherwise seems fine <4> yah <4> sweet. <4> they are too low in pids? <4> oh, nvm <1> proc ids <1> :) <1> those kinda things will not be started early, hence their ids are way way too low to be pids <1> :) <4> you cant change /proc/net/dev to everyone read can you? <1> er I can read it as a normal user, and its a proc, so would not think so as its recreated on boot etc. <1> ./proc is not a real filesystem <4> httpd cant access it tho. <4> but normal users can. <1> httpd might be chrooted :) <1> and I swear hmm whats it called that stats program that reports basic info on a .php page access proc <1> meh I forgot its name <4> oh phpsysinfo? <1> yes <1> thats it <1> that access the proc info to get net stats and stuff I think. <4> yeah i figured out what was the problem. exec'd the wrong script :x <1> hehe <4> i could be in use of sleep lol <1> we could all use some sleep I recon ;) <4> you damn computer nerds! <1> nerd is a rude term, geek please. <1> nerd != geek <1> nerd's don't have to be into computers :P <4> lol <1> well thats not what google's define:nerd says <1> but I say otherwise ;) <4> s/nerds!/geeks! <4> ;/ <5> i have this: set invite(blah) 0.. then i have my proc, where i'm doing: set invite(blue) 1... but the blue never gets saved, the next time the proc runs invite(blue) does not exist... wtf am i doing wrong? <4> is set invite(blah) 0 a global var? or a proc var? <4> you could allways try set ::invite(blue) 1 <5> global <4> i believe is how its used. <4> not set , but ::invite(blue) 1 <5> i'm setting a bunch of: set invite(*)'s, then in my proc i'm trying to add new invite(whatevers) <4> i believe you have to declair them <5> i hope not <5> the invite(whatever) is someone's nickname <5> like invite(smokey) <4> i hardly ever use var(var2) <5> invite(tanto) <4> ohhh, a ftpd invite script? <5> no
Return to
#eggtcl or Go to some related
logs:
latinmaids fedora, 2120s #cisco #delphi brenda naked pics #worldcup #tcl #stocks #hardware #worldcup
|
|