| |
| |
| |
|
Comments:
<0> is there a reason why 'n' chars are getting replaced with ' ' when i echo them? <1> fedx_, example? <0> if i do something like "echo '/src/sh/corGen/Slide_to_CEL_mapping-1.txt' " it works find, but foo='/src/sh/corGen/Slide_to_CEL_mapping-1.txt; echo $foo spits out the path without 'n's <1> fedx_, what's $IFS? <0> i set it ="\n" =) <1> Not clever. <0> heh <0> why is it getting in the way? <0> n is not \n
<1> Special chars are expanded when VAR= ***ignment, not when $VAR expanded. <1> \n is not special like you used it, so it keeps it literally. <1> As \ and n <0> gah <0> how do i get it to read it as a newline char? <1> You must use literal linebreak there. <1> IFS=' <1> ' <0> ah hah. ok thanks <2> hm <2> foo=$(print -n '\001') would work <2> but foo=$(print -n '\n') not, right? <2> mmh. trailing \n gets removed. <2> I think that's bourne and posix <1> Maybe \n\n would work. <2> no it doesnt <2> foo=$(print '\nx'); IFS=${foo%x} maybe <2> tg@herc:~ $ foo=$(print '\nx'); bar=${foo%x}; print -nr "$bar" | hd <2> 00000000 0A - |.| <2> yep ;) <2> because if you want IFS=<space><tab><newline> you lose with your method <1> Much better than my solution. ;) <1> No, I don't: <2> yes, but not that portable to non-korn shell <1> IFS=' TAB <1> ' <1> Huh, why not? <2> oh, you do, once someone does 1,$s/[<tab><space>]$/s/[<tab><space>]*//g on the file <2> no trailing whitespace at end of line is one of the rules that is common to many coding styles <2> I think libtool or autoconf used to do it <2> (and I wonder why it broke) <2> libtool. now they do: <2> # Make sure IFS has a sensible default <2> lt_nl=' <2> ' <1> IFS=' TAB''
<2> IFS=" $lt_nl" <2> hm. other possibility. <2> yep, that'd work too <2> d'oh <2> nobody thought of concatenation ;) <0> stupid question: how do i append a string in a variable? <2> fedx: var="${var}stringtoappend" <2> or var=$var'stringtoappend' <0> i'thanks <0> thanks <2> depending on how much quoting you need <1> mirabile, you're invited to suggest my idea to autoconf/libtool people. ;) <0> it does not seem to work. i define a variable outside a while. everytime the while itterates it generates some string and i do a oldstring="$oldstring$appendstring" but it always results in just the oldstring <0> did i miss something obvious? <1> by chance the while is after a | pipe? <0> yes <0> what does that imply? <1> That's your not using AT&T but pd-ksh. <0> i suppose there is a difference in scope or something? <1> fedx_, see pd-ksh home -> faqs/ most often reported bug. <0> hrm. is there a quick fix? can't seem to find it in the file <1> find what? <0> a solution <1> write to tmp-file, let while read from tmp-file: while ...; do ...; done < tmp-file <2> use coroutines <2> fedx_: ***ume you have <2> somecommand | while read foo... <2> replace this with <2> somecommand |& <2> while read -p foo... <0> last question. is there a simple way to scp more then 1 file at once from remote to local? <0> the man page seems to imply so,but can't get it to work properly <1> off-topic, but ... scp host:... host:... local-dir <0> worked thanks <0> is there a way to get it to ask for the p***wd only once? <2> sure <2> tar cf - file1 file2 ... | ssh target 'tar xphf -' <2> ah, from remote <2> ssh remote 'tar cf - file1 ...' | tar xphf - <1> or use ssh-agent <2> that's still very slow if you have to do multiple auth <2> unless you use ssh connection multiplexing <2> in which case you don't need ssh-agent either <2> but rsa keys are a good idea wrt. p***words anyway
Return to
#ksh or Go to some related
logs:
linux 480cdt #suse gentoo cross-gcc-stage1 #perl PERM_FAILURE: SMTP Error (state 12): 554 mail server permanently rejected messag #perl serializing pyswigobject libwx_gtk2ud ubuntu #math sb-bsd-sockets:socket-send
|
|