| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8
Comments:
<0> greycat: Im expecting a incoming bash.... {Braces for impact :D } <1> tars=(filename*); if [ ${#tars[*]} -gt 4 ]; then rm "${tars[0]}"; fi <2> um, alternatives to 'df' to see the free disk space? <1> bdf on HP-UX <0> greycat: {looks up} oh hey thanks !!! Your awesome <1> This only works because of the two points I made earlier. <2> is theren't some file in /proc that shows the filesystem info? <1> imadev:~$ ls /proc <1> /proc not found <1> Wrong channel. <2> i've a strange problem: if i type df in a shell i get only the titles of the columns <2> the same if i type 'mount' <1> "type df" (use the type command) <1> mount has no titles. <2> mount lists the mounted fs <2> ah, yes
<2> it shows me only one line <2> usbfs on /proc/bus/usb type usbfs (rw) <1> This would be the point where we send you packing to ##linux. <2> ok <1> imadev:~$ mount <1> on /dev/vg00/lvol3 log on Thu Sep 29 04:38:30 2005 <1> /stand on /dev/vg00/lvol1 defaults on Thu Sep 29 04:38:31 2005 <1> [etc.] <1> (Hmm.... when did irssi suddenly decide *not* to protect me from lines with leading / in a paste?) <3> !faq prem <4> No matches found at http://wooledge.org/mywiki/BashFaq <3> !faq premisons <4> No matches found at http://wooledge.org/mywiki/BashFaq <5> !faq permissions <4> http://wooledge.org/mywiki/BashFaq#faq38 -- How do Unix file permissions work? <3> thx <5> NP :) <0> thanks again greycat... I appreciate it <6> !faq premonitions <4> No matches found at http://wooledge.org/mywiki/BashFaq <6> Darn. <5> :) <3> :-D <3> love you guys :-P <6> lunaphyte: you asked a question yesterday about sending STDOUT someplace, STDERR someplace while throwing away STDOUT and keeping STDERR connected to terminal. This is probably not the most portable piece of shell, but if you are running Lunix, you should be able to do this. Process substitution plus logger. <6> proggie > >( logger -t 'STDOUT' ) 2> >( logger -st 'STDERR' ) <6> The data will end up in your syslog. <1> sending stdout someplace, throwing away stdout, what?! <7> is there a way to get expr to generate numbers with leading zeroes or an alternative way to do arithmetic in bash? <1> !math <4> http://wooledge.org/mywiki/ArithmeticExpression <1> !faq zero <4> http://wooledge.org/mywiki/BashFaq#faq18 -- How can I use numbers with leading zeros in a loop, e.g. 01, 02? <1> Hint: NEVER use expr. Ever. At all. For anything. <1> the only person here who ever uses it is heiner, because he's obsessed with 1970s shells. <6> greycat: He asked yesterday evening, and it struck me as an interesting enough question. He wanted to send STDOUT to /dev/null, keep STDERR connected to terminal and make sure that both streams were copied to a file. <6> Yes, if you can avoid expr, do. <6> I don't know why he doesn't want his STDOUT, but that's his problem. <1> so he wants stdout in a file, and stderr both filed and ttyed? <1> command >file 2> >(tee otherfile) <8> I think you want: command > file 2> >(tee otherfile >&2) <1> maybe. <1> bear in mind, I'm trying to convert mangled questions into English in the first place, so I might not even understand the actual goal. <8> and while it does not exactly 'keep STDERR connected to terminal', it does end up having it's output sent to terminal, so it's all just a guess of what the intentions really are <8> command 3>file >&3 does not copy command's stderr to file; even though the manual says >&word is equivalent to &>word. I suppose word cannot be an fd but only a file? <9> &> is stdout + stderr <9> >& is fd redirection <9> lhunath i hope you got that :) <8> they are both fd redirection, the latter being copying an fd. <9> always more pedantic :) <9> you get the idea, no? <8> ;P I got the idea, thanks. <8> it is not entirely relevant to my question which is just a syntax thing. <8> but never mind the question, I know the answer is 'yes'. <9> <8> I suppose word cannot be an fd but only a file? <9> this q? <8> that being the only question I asked, yeah. <9> well yes, it's kinda confusing-ly explained in man bash <9> there's "word" but imo it should be 'number of 3-9' <8> no, it is right as it is, and it denotes a file, not an fd
<8> so not a 'number from 3-9' lest you want to call your file that, heh <9> hmm :) <8> !faq <4> No matches found at http://wooledge.org/mywiki/BashFaq <10> Hello. <9> lhunath yea i see now <10> I have cmd1 & cmd2 & cmd3 && cmd4. I would like to execute cmd4 only when ALL others commands done. <10> Currently, it launches cmd4 after cmd3 ending. <9> help wait <11> is there any way to check if file contains three numbers ? <11> file=variable :P <9> if grep ... <9> :P <6> Bob_le_Pointu: cmd1 & cmd2 & cmd3 & wait && cmd4 <10> I'll look at that. Thanks <11> VImtermute: if grep {****ing long series of numbers?} :?? <11> or is there anyway to tell grep just to look for number <9> i thought three numbers as in '123' or '234' <9> :P <8> hoxzer_: try to be a little more specific to your needs than 'check if file contains three numbers' <9> true <11> lhunath: I'm trying to create parser that parses two things from string like "something.something.103.HDTV-lol.avi" what I need to parse is 1 and 03 <10> Thanks wonderfrog, it seems to work. <9> that's just 2 numbers :) <11> Somethings... can continue appearing for unknown time so I cannot use dots for parsing <8> and three digits, and parsing is different from checking <9> Hoxzer_ [0-9] <11> VImtermute: :D ... well maybe yes but <11> oh <11> ok... <9> or [[:digit:]] <11> ok <8> do you want to know whether there is a number with three digits in a string, or do you actually want to know WHAT those digits are? <8> the former is checking, the latter is parsing. <11> lhunath: I was thinking about using digits themselves for parsing <10> i have another question : <10> I would like to store $(date +%Y%m%d) in a variable,but export today=$(date +%Y%m%d) doesn't work. I suppose I have to put some quotes somewhere, but where ? <8> define "doesn't work" <9> the syntax is just fine <8> $ export today=$(date +%Y%m%d); echo "$today" <8> 20070208 <6> Sounds like a disappearing question. Read this, Bob. <6> !faq disappear <4> http://wooledge.org/mywiki/BashFaq#faq24 -- I set variables in a loop. Why do they suddenly disappear after the loop terminates? <6> See if you are experiencing that problem. <12> Is there a quick way to tell if a directory is empty? <13> find -empty <14> !faq dir <4> http://wooledge.org/mywiki/BashFaq#faq4 -- How can I check whether a directory is empty or not? <10> I must be stupid, because this script works perfectly, sorry for that question wonderfrog and lhunath. <6> Have a good day! <1> _sho_: <1> imadev:~$ find -empty <1> Usage: find path-list [predicate-list] <1> imadev:~$ find . -empty <1> find: bad option -empty <13> yeah its a gnu bit and you need to upgrade <13> we know we know :) <13> and you wont upgrade until someone points a gun at your head <12> find -empty doesn't seem to recognize . files :( <13> what. .dir type directories? <13> find . -type d -empty or use the faq <12> find foo -type d -empty -maxdepth 0 <12> will show a directory being empty, even when it contains . files <1> arc1:/tmp$ mkdir foo <1> arc1:/tmp$ touch foo/.bar <1> arc1:/tmp$ find foo -type d -empty <1> arc1:/tmp$ find foo -type d -empty -maxdepth 0 <1> arc1:/tmp$ <13> nod@gc <1> or in other words, I can't reproduce your claim, Flimzy <12> I wonder if it's a FS bug
Return to
#bash or Go to some related
logs:
php error DomDocument class not found install yahooo
Failed to grab lock asterisk gentoo yellow use flags
dnat 139 port not work inurl:gentoo No matching Device section for instance 3ware Drive power on reset detected #css captiventfs kanotix Fatal error: mysql.user table is damaged or in unsupported 3.20 format
|
|