new redirection operator seems broken

2009-03-11 Thread Matt
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: i686-pc-linux-gnu-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/loc

Re: EOF disowns background jobs?

2009-03-11 Thread Chet Ramey
Matthew Woehlke wrote: > $ some-command & > $ ^D > (bash exits, leaving some-command running) > > Is this what is supposed to happen? Just asking because it made me go > "huh?"; I was expecting some-command to get SIGHUP'd. Yes, that's what's supposed to happen. How could you run daemons from th

Re: bash does not run startup files

2009-03-11 Thread Chuck Harding
Problem solved - it seems as though for some reason I included the --enable-strict-posix-default option in the configure script I was using, not realizing the ramifications. Mea culpa. -- Charles D. (Chuck) Harding Voice: 925-423-8879 Senior Computer Technologist LC Operations Fa

EOF disowns background jobs?

2009-03-11 Thread Matthew Woehlke
$ some-command & $ ^D (bash exits, leaving some-command running) Is this what is supposed to happen? Just asking because it made me go "huh?"; I was expecting some-command to get SIGHUP'd. -- Matthew Please do not quote my e-mail address unobfuscated in message bodies. -- Microsoft has become

Re: bash does not run startup files

2009-03-11 Thread Chet Ramey
> >> Description: > >>        no matter how I invoke bash, it will not run any of the startup > >> scripts: /etc/profile, ~/.bash_profile, ~/.bashrc - this is either being > >> started by /bin/login or in an xterm session You could always run bash in the debugger and set a breakpoint at run_star

Re: bash does not run startup files

2009-03-11 Thread Chuck Harding
On Wed, 11 Mar 2009, Pierre Gaston wrote: On Tue, Mar 10, 2009 at 8:42 PM, root wrote: Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu - Red Hat Enterprise Linux Client release 5.3 (Tikanga) Compiler: gcc Compilation CFLAGS:  -DPROGRAM='bash' -DC

Re: loop through records

2009-03-11 Thread Chris F.A. Johnson
On Wed, 11 Mar 2009, OnTheEdge wrote: All, I'm trying to figure out how to loop through an array of records (if possible) and reference fields in that record, but I've only been able to reference the entire array (array[0]) or when assigned with parens, there is no concept of a row... #!/bin/b

Re: loop through records

2009-03-11 Thread Greg Wooledge
On Wed, Mar 11, 2009 at 01:11:51PM -0700, OnTheEdge wrote: > array1="187431346 0323 mirrored 11866 > 187431346 0324 mirrored 11866 > 187431346 0325 mirrored 11866 > 187431346 0326 mirrored 11866" That's not an array. It's just a big string. array1=("187431346 0323 mirrored 11866" "187431

Re: loop through records

2009-03-11 Thread Tony Zanella
awk may be a help here. Using it, you can refer to fields, like so: $ cat f1 187431346 0323 mirrored 11866 187431346 0324 mirrored 11866 187431346 0325 mirrored 11866 187431346 0326 mirrored 11866 $ awk '{print $1;print$2}' f1 187431346 0323 187431346 0324 187431346 0325 187431346 0326 On Wed

loop through records

2009-03-11 Thread OnTheEdge
All, I'm trying to figure out how to loop through an array of records (if possible) and reference fields in that record, but I've only been able to reference the entire array (array[0]) or when assigned with parens, there is no concept of a row... #!/bin/bash array1="187431346 0323 mirrored 1186

Re: delete elements from an array...

2009-03-11 Thread Greg Wooledge
On Tue, Mar 10, 2009 at 03:21:38PM -0400, Chris F.A. Johnson wrote: > while [ $n -lt ${#arra...@]} ] > do > case ${array2[$n]} in > *"$match"*) > array1[${#arra...@]}]=${array2[$n]} > unset array2[n] Unsetting elements of array2 will create holes in the array, which means $

Program to search unusual strings?

2009-03-11 Thread Angel Tsankov
Hi, Which program can be used to search for line-feed characters in a string that might contain null characters? Regards, Angel Tsankov

Re: bash does not run startup files

2009-03-11 Thread Pierre Gaston
On Tue, Mar 10, 2009 at 8:42 PM, root wrote: > Configuration Information [Automatically generated, do not change]: > Machine: i686 > OS: linux-gnu - Red Hat Enterprise Linux Client release 5.3 (Tikanga) > Compiler: gcc > Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' > -DCONF_OSTYPE