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:
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 )) )
___
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;
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
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
>
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
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