delorie.com/archives/browse.cgi | search |
On Tue, 2005-03-08 at 15:38 -0800, Brian Dessent wrote: > Hannu E K Nevalainen wrote: > > > $ cat >>.profile <<EOD > > > > function od() { > > if [ -r "$1" ] ;then replace with: if [ -z "$1" ] || [ -r "$1" ] ; then for pipe-functionality using my special arguments. ...or rebuild this with "case ;... ;esac" instead... > > argline="-A x -v -t x1z -w24 $1" > > else > > # Problem with dual evaluation on argline? > > argline="$*" replace with "$@" here, at your preference, which IMO should be a better default. Read more after typing: $ man bash /Special parameters > > fi > > command od $argline > > argline= > > } > > EOD > > That doesn't work so well if you ever need to do "od file1 file2" or > "(some command) | od". In the former case you only get the first file > and in the latter you don't get the options passed. > > Brian Note 1: You stripped out the <UNTESTED/> - i.e. my note to you that there likely was things that didn't work as you would have expected. Note 2: Did you find the behavior you pointed out hard to change? I didn't. And last: You got what you paid for as usual. -- Hannu E K Nevalainen <_garbage_collector_ KRINGLA telia.com> -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |