Re: Exit-on-error option does not work as expected

2007-07-17 Thread Archimerged Ark Submedes
On 7/17/07, Paul Jarc <[EMAIL PROTECTED]> wrote: Nevertheless, it is. The current behavior is too well-entrenched to change it, so the most reliable way to get the behavior you want is to skip "-e" and add "&&" between all commands. Change the documentation to insert the bracketed sentence:

Re: Subnet address

2007-07-21 Thread Archimerged Ark Submedes
On 7/20/07, Mike Frysinger <[EMAIL PROTECTED]> did not read the question. The answer is: /sbin/ifconfig eth0 | grep 'inet addr' | tr .: ' ' | (read inet addr a b c d Bcast e f g h Mask i j k l; echo $(($a & $i)).$(($b & $j )).$(( $c & $k )).$(( $d & $l )) ) ___

Re: TZ=... date affected PROMPT_COMMAND

2008-04-16 Thread Archimerged Ark Submedes
This version works the same as the more verbose one: PROMPT_COMMAND='prompt_status=\ $?' PS1=$SPECIAL_PS1"$my_color_on\A\${prompt_status# 0} \W\$$my_color_off " Putting the variables inside $(...) avoids global variables and use of PROMPT_COMMAND: PS1='\A$(S=$?; W=$((S>99?4:(S>9?3:(S>0?2:0;

bash: S>99?4:S>9?3:S>0?2:0: syntax error in expression

2008-04-18 Thread Archimerged Ark Submedes
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKA

Re: -e does not work inside subscript when using || or && operator outside

2008-08-07 Thread Archimerged Ark Submedes
On Wed, Aug 6, 2008 at 7:13 AM, Christian Jaeger <[EMAIL PROTECTED]> wrote: >$ bash -c '( set -e ; false; echo "hu?" ) || echo "false"' >hu? ># expecting "false" > >$ bash -c '( set -e ; false; echo "hu?" ); if [ $? -ne 0 ]; then echo > "false"; fi' >false >

Re: Last modified files with owner / time / permissions

2008-09-18 Thread Archimerged Ark Submedes
On Wed, Sep 10, 2008 at 3:11 PM, lexton <[EMAIL PROTECTED]> wrote: > ... bash script that prints out the files that have been modified in > the last 5 days ... Try this: #!/bin/bash # note run above line with -x for debug mode export PATH=/usr/bin:/bin FILENAMECOLUMN=8 # 9 on old systems or if LC

Re: Strange change between bash-3.2 and bash-4.0

2009-02-11 Thread Archimerged Ark Submedes
Ulrich Drepper in comment 6 to redhat bug 483385 links to austin-group-l, item 11863 by Geoff Clare: https://bugzilla.redhat.com/show_bug.cgi?id=483385#c6 https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=index.tpl&source=L&listname=austin-group-l&id=11863 Geoff Clare writes: [...] I thi