Re: Questions about commandline-args

2011-11-12 Thread Christopher Roy Bratusek
On Saturday 12 November 2011 02:02:01 Chris F.A. Johnson wrote: > On Sat, 12 Nov 2011, Christopher Roy Bratusek wrote: > > On Friday 11 November 2011 19:32:51 Chris F.A. Johnson wrote: > >> On Fri, 11 Nov 2011, Christopher Roy Bratusek wrote: > >>> Hi list, > >

Re: Questions about commandline-args

2011-11-11 Thread Christopher Roy Bratusek
On Friday 11 November 2011 19:32:51 Chris F.A. Johnson wrote: > On Fri, 11 Nov 2011, Christopher Roy Bratusek wrote: > > Hi list, > > > > I've got a question about commandline args, imagine: > > > > personal_function ab{c,d} > > > > personal_fun

Questions about commandline-args

2011-11-11 Thread Christopher Roy Bratusek
Hi list, I've got a question about commandline args, imagine: personal_function ab{c,d} personal_function will receive abc and abd. Is there a way to make it receive ab{c,d} instead (without chaning the arguement itself)? (The actual problem is not that personal_function can't handle the arg, b

Re: How to echo the return value of a program

2011-01-22 Thread Christopher Roy Bratusek
On Saturday 22 January 2011 09:29:11 ali hagigat wrote: > I want to print the return value of an executable like: > make -q -f makefile22 > The above command returns non-zero if the targets are not up to date. > How can i see that value by shell commands. I am using /bin/bash, > Fedora gnome-termin

Re: asking for a better way to implement this

2010-09-27 Thread Christopher Roy Bratusek
> > You might reinstall your OS one day, either due to hardware failure or > > simply upgrading. Then you might forget to build the rm alias. ... it's set by one of my applications and xrm is part of that applications script-chain. It's rc is called from .bashrc and that sets-up the alias. Whe

Re: asking for a better way to implement this

2010-09-27 Thread Christopher Roy Bratusek
> It's a bad idea to alias rm. It would be better to use your xrm > directly. If you alias rm and get in the habit of it protecting you, > one of these days the alias won't be there and OOPS, gone! Well... I know what you mean, but I'm using GNU/Linux for seven years now, it's now almost impossib

Re: asking for a better way to implement this

2010-09-27 Thread Christopher Roy Bratusek
Am Sun, 26 Sep 2010 18:09:16 -0400 (EDT) schrieb "Chris F.A. Johnson" : > On Sun, 26 Sep 2010, Christopher Roy Bratusek wrote: > > > btw. How can I remove the last arguement ${!#} ? > > > > I tried args=${@:-${!#}} but that won't work. > > ar

Re: asking for a better way to implement this

2010-09-26 Thread Christopher Roy Bratusek
btw. How can I remove the last arguement ${!#} ? I tried args=${@:-${!#}} but that won't work. Chris

Re: asking for a better way to implement this

2010-09-26 Thread Christopher Roy Bratusek
> Style is a matter of taste, but I think this is equivalent (not tested): > > xrm () { > for path in "$@"; do > test ${path:0:1} == - && local RMO+="$path " && continue > for try in "$path" "${path%/*}"; do > test -e "$try"/.dirinfo || continue

asking for a better way to implement this

2010-09-26 Thread Christopher Roy Bratusek
Hi all, I'm writing a wrapper for rm, which does not let the file/directory be removed, if there's a .dirinfo file in the directory containing "NoDelete". (feel free to ask what that's all about.) This is what I have: xrm () { for path in $@; do if [[ $path == -* || $p

Translating a shell script

2010-08-29 Thread Christopher Roy Bratusek
Hi all, I'm struggling around at translating a shell script. Well I've set it up, the pot file contains all strings, the german .po file is finished, but: the strings won't show up... Actually it's just a test how good translation works for shell-scripts. (It's an huge amount of strings I woul

Re: bash associative array not working at all, so stupid!

2010-03-09 Thread Christopher Roy Bratusek
Am Tue, 9 Mar 2010 11:34:04 -0500 schrieb Chet Ramey : > Am I the only one who didn't receive any actual message content here? > You're not. -- KDE 3.1 no no no no no Gesendet von Jonny am Sa, 9. Nov um 8:36 KDE ist nur windows Nachbildung Es ist viel zu fehlerhaft und viel zu langsa

Re: how to crash bash in two easy ways

2010-02-22 Thread Christopher Roy Bratusek
Am Mon, 22 Feb 2010 02:30:32 -0800 (PST) schrieb pbr : > bashbug called sendmail, a link to exim4 which silently ignored the > following (which is a bug in its own right) so I'll post this manually > instead. > > I found two one-liners which crash bash. > > Configuration Information [Automatical

Re: Possible Feature Requests (unsource, exchange)

2009-07-08 Thread Christopher Roy Bratusek
Am Tue, 7 Jul 2009 14:37:20 -0400 schrieb Greg Wooledge : > On Tue, Jul 07, 2009 at 08:16:50PM +0200, Christopher Roy Bratusek > wrote: > > unsource: the opposite of source (while source is making functions > > publically available, unsource would remove them) > > You c

Possible Feature Requests (unsource, exchange)

2009-07-07 Thread Christopher Roy Bratusek
Hi all, what I'm currently missing are the following two things (I'm not 100% sure if they are not available): unsource: the opposite of source (while source is making functions publically available, unsource would remove them) exchange: exchanges the value of two variables (x=2 y=a; exchange x