[00:24:43] <dymaxion> I have a set of data to extract and am using curl | awk to extract and reformat each item of data. However instead of fecthing the webpage N times for each item, I wanted to cache the webpage. [00:24:43] <dymaxion> I do this? thanks [00:25:14] <yitz_> !umq > dymaxion [00:25:16] <greybot> dymaxion: “USE MORE QUOTES!” They are vital. Also, learn the difference between ‘ and ” and `. See http://mywiki.wooledge.org/Quotes and http://wiki.bash-hackers.org/syntax/words. [00:25:27] <yitz_> And use files for the curl’d items, perhaps? [00:25:39] <twkm> don’t use all upper-case variable names. quote your expansions. [00:26:05] <twkm> for the array use a loop or a better IFS. [00:26:09] <dymaxion> so pull the curld data into a local /tmp/ file instead rather than variable. is it possible to do it only using variables? [00:26:09] <twkm> all of which are faq’s. [00:26:14] <dymaxion> ok thanks [00:26:57] <dymaxion> IFS and specify newline as the separator… yeah I gues that would be ok… only hassle I find with IFS is it’s a bit verbose, saving the IFS, changing, restoring… etc. [00:27:08] <dymaxion> just thought maybe there was a really succint way of doing it. [00:27:31] <twkm> then either don’t save it, or hide that from yourself via a function. [00:28:27] <dymaxion> ok sure.. thanks for the input… were prob the two other optiosn I was considering… cheers
[01:30:51] <scottj> I want to test if the params to a bash script include the phrase “youtube.com” or “youtu.be”, how would I do it? [01:31:56] <pgas> !faq easily [01:31:57] <greybot> http://mywiki.wooledge.org/BashFAQ/035 — How can I handle command-line arguments (options) to my script easily? [01:32:29] <pgas> case $1 in *youtube.com*|*youtu.be*) ….;;esac [01:32:59] <scottj> pgas: thanks [01:35:12] <GordonFreeman> hi [01:35:13] <GordonFreeman> http://www.slug.org/bizen?Linux/Mouse_In_A_Terminal [01:35:20] <GordonFreeman> for fun <; [02:47:03] <mute> GordonFreeman: this your code [02:47:05] <mute> ? [02:48:19] <GordonFreeman> nope [02:48:44] <GordonFreeman> found it interesting [02:54:41] <mute> you posted it before.. ive been messing with input stuff lately and added mouse.. wanna see mine? : [02:59:37] <mute> http://sprunge.us/eXGd?sh [03:01:18] <mute> it’s still brand-new. [03:54:26] <geeky> hi [04:15:50] <jaggz-> how can I error to syslog? [04:16:31] <jaggz-> I can’t find my at-job logs (if they exist), and sometimes it’s important that I be able to see what time a command was run [04:27:02] <trash> jaggz-: logger(1) [04:29:53] <geirha> or possibly mail(1) [04:38:58] <cloudowind> logger(1) is not working out on my shell instead logger 1 working [04:39:25] <cloudowind> what about -s option?if not specified the error is not being directed to stderr? [04:42:00] <meta-coder> Hello, is Chet Ramey here? [04:42:42] <geirha> No, never seen him in here. [04:46:14] <cloudowind> aww: ) you meant check the man by (1) i guess:D [04:46:38] <geirha> Yes, the (1) means you find it in man category 1. [04:46:40] <meta-coder> http://tiswww.case.edu/php/chet/ [04:46:55] <meta-coder> ^ Chet Ramey’s home page [05:01:35] <cryptopsy> how can i create a link /m so that when i cd to /m it, then ‘cd ..’ in the target, it will go to ../ of the target ? [05:12:15] <ormaaj> cryptopsy: help cd. look for -P. I’m not aware of any way to do it implicitly from the filesystem unless your system has some special facility for it. [05:13:23] <ormaaj> also pwd -P can be useful sometimes. [05:15:41] <cryptopsy> assume /m points to /a/m/m [05:15:49] <cryptopsy> in /a/m/m, ‘cd ..’ should bring me to /a/m [05:15:57] <cryptopsy> but it doesn’t [05:15:59] <cryptopsy> so how do i do it? [05:19:50] <cryptopsy> is that what a hard link does, because it won’t met me create one [05:23:09] <ormaaj> O_o http://xkcd.com/981/ [05:32:34] <cryptopsy> ormaaj: yea so is it possible [05:32:37] <cryptopsy> should i read those things you told me about? [05:34:24] <cryptopsy> perhaps you meant to say ‘no, you have to cd .. -P’ , can you be any more superfluous? [05:36:42] <ormaaj> cryptopsy: Yes pretty much you want -P. It sounded like you wanted cd to somehow know you always wanted that on that directory. [05:37:13] <ormaaj> If you want the gory details of pathname resolution. the steps described in the spec: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cd.html#tag_20_14 [05:41:00] <cryptopsy> thanks
Nov 292011