| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9
Comments:
<0> as it works fine, what is wrong with using it? <1> greycat, ok, thanks again <0> I believe there may be lot of other things also that bash inherited from other shells <1> m4n, as usual, there are the good practise, and what should be used and what it is not :) <0> groton: i have never seen &> is experimental or anything <0> be it property of any shell, once being ported to bash, I think its fine to use them <1> also windows is not experimental or anything, but using it is bad. <0> who said using windows is bad <0> its all personal interest <1> me, who is actually using it :) anyway, i was kidding :P <0> i dont have a windows box either.. but I dont think its bad using them .. everything has got its pros and cons <2> koala_man: a/config sets a value ... a/b/config overrides it, but i want to the value from a/config again as default value for a/c/config <3> Helo <4> someone want to explain this to me: <4> (4 line paste) <4> [sunny@lexington ~]$ file foo
<4> foo: ASCII text <4> [sunny@lexington ~]$ cat foo <4> -bash: foo: command not found <4> o_O <5> you aliased "cat"? <4> no <5> what does "type cat" say? <4> [sunny@lexington ~]$ ls -l foo <4> -rw-rw-r-- 1 sunny sunny 30 Jun 12 23:20 foo <4> cat is hashed <5> what does it SAY? <4> [sunny@lexington ~]$ type cat <4> cat is hashed (/bin/cat) <4> HAH! ... it does the same thing zsh <5> hmm... what did you do to your system? <5> did you corrupt /bin/cat? <6> cat is hashed? <6> cat is /bin/cat <5> quag|work: "cat /dev/null; type cat" <6> greycat: what do I do now? <4> no, rpm -V reports /bin/cat being fine <6> cat is hashed (/bin/cat) <6> i don't like cat is hashed thing <5> sunny: can you cat *other* files? <5> quag|work: help hash; man bash <6> greycat: i can <5> quag|work: NOT YOU. <4> greycat: cat works fine <7> Is it possible to turn epoch time to some fancy format via date or any similar command? <6> knt: nothing is impossible <5> GNU date can do it. so can perl. <5> gdate -d "1970-01-01 UTC + $SECONDS seconds" <6> chmod -x /bin/chmod <4> greycat: any ideas ? <6> then you can still recover using perl <5> sunny: hm... less? more? pg? vi? <4> oh, wait <4> file CONTAINS that line <4> thats not cat outputting it <4> hah <5> hahahahahaha <7> greycat: thanks, -d param solved my problem. <4> [sunny@lexington ~]$ cat foo 1>/dev/null <4> [sunny@lexington ~]$ <5> that's hilarious :) <4> yeah <4> it sure had me <2> koala_man: You see the problem? Maybe i just stay with local, after all it's on ksh, bash and ash... <2> The only thing i really miss in POSIX sh <8> sup guys.. can someone recommend and good book for bash programing (or scripting depending on what u want to call it)? <9> book ? <8> ya <9> have you already read through http://tldp.org/LDP/abs/html/ <9> ? <9> :P <10> and the other URLs in the topic.. <8> well.. i work for a non-profit org so printing a whole doc site is out of the question plus I prefer to read a book than on-screen <8> hence, i am looking for a bok <8> book* <6> bash is not turing complete? <6> i love bash
<11> i think bash is <11> it has arrays, a pointer <11> and it can move symbols <11> it can even compare them <12> /join #sed <12> oops <2> aixing: Shell Scripting Recipes: A Problem-Solution Approach <8> kanaldrache: thnx <2> aixing: It's my favourite <8> :) <13> If I read a file line by line with 'while read' and output the lines with echo. Can I somehow keep the whitespace in the lines? Right now the output lacks spaces/tabs. <5> while IFS=$'\n' read -r line; do ... <5> that will help preseve *leading* whitespace. <5> if you're missing *internal* whitespace, it's not read's fault. <5> !pitfalls <14> http://wooledge.org/mywiki/BashPitfalls <13> greycat: thank you :) Leading whitespace is all I need to preserve. <15> how do i write in .bash_profile to tell it to keep a history file? <5> it does that by default. <5> or, "man bash, search for `hist'" <16> sup all <12> chalcedony: ping :) <16> how could i use the output of ps ax|egrep "evolution --component=mail" to launch mail if its not running and not launch it if it is, problem is that it shows always one line: the egrep line itself <17> is there any easy way to get the result of ps for only processes more than 10 minutes old? <5> jesus. <17> The hard way seems like parsing out the time from the ps output <5> !faqrunning <14> http://wooledge.org/mywiki/BashFaq#faq42 -- How can I find out if a process is still running? <5> !faqmutual <14> http://wooledge.org/mywiki/BashFaq#faq45 -- How can I ensure that only one instance of a script is running at a time (mutual exclusion)? <18> I executed a while loop on my shell and now I can't get it to stop. ^C doesn't work. Am I forced to kill the process? <5> !vagueness <5> !learn vagueness VAGUENESS CAUSES HEART DISEASE! <14> OK, greycat <18> What my explanation to vague? <19> if i have a variable $foo in a script and i want to 'wget something.com/$foo' how would i do that? <20> greycat: on my web hosting env, it doesn't seem to generate bash history file <5> WHAT doesn't? <5> are you launching an interactive shell? are you running scripts from apache/CGI? from cron? <21> Trying to write a script to remove empty files in a directory. It works, however I need to run it multiple times, so I think there is a problem with the while loop. http://pastebin.com/727511 <22> wtf <22> find . -type f -size 0c -exec rm -f {} \; <22> script? <6> lol <6> that's thedailywtf <22> gertrude, wow <21> Well thanks <22> did you really write this to try and do that? <21> yea <22> man find <22> find is your friend. its very powerful <22> how would you gunzip several files at once and cat them all together <10> gunzip *; cat * > foo? <22> would that be faster than zcat *.gz > foo? <10> or even gunzip -c * > foo? <22> ah yep, didnt see that -c flag <23> how to start two program in one command ? <10> foo&bar <18> prog1 && prog2 <18> or prog1; prog2 <18> of course, that is one line, not one command <23> prog1 && prog2, cat work. I mean, the prog1 doesn't rethurn, and the prog2 starts <18> right <5> tell us what you want. you're not being clear. <22> you cant do simultaneous command execution <22> you can do sequential if you feel like <5> you can do damned-close-to-simultaneous background jobs. <22> nod <5> but, he has to tell us what he *wants*. <22> but close only counts in horseshoes and handgrenades <23> I use sopcast : I want to start them at one terminal: prog1:sp-sc sop://211.152.34.35:3912/6002 10000 20000 and prog2:mplayer http://localhost:20000 <5> does one of them *use* the other in some way? they appear to be related. <5> e.g., I would *guess* that mplayer is trying to read from the socket that the sp-sc program listens on. <5> in which case, you need to start mplayer *after* sp-sc has already got the socket open and is ready.
Return to
#bash or Go to some related
logs:
html.replace scriptaculous #gentoo Starting ESP Ghostscript craigslist.co #oe #suse php6+$_get fc5 install anaconda error 1218 ktorrent in kubuntu symlink error #debian
|
|