Re: undefined reference to `__strtoll'

2010-02-12 Thread Bob Proulx
Dave Moore wrote: > I didn't read this carefully -- should I try the patch you suggested > before we do anything else? Yes. (Dave and I had some private email exchange where we discussed the contents of on his system. I see that he is suffering from the bug that I described.) The problem is

Re: undefined reference to `__strtoll'

2010-02-12 Thread Dave Moore
Bob, I didn't read this carefully -- should I try the patch you suggested before we do anything else? -dave On Thu, Feb 11, 2010 at 16:43, Bob Proulx wrote: > Greg Wooledge wrote: > > Dave Moore wrote: > > > Machine: hppa2.0w > > > OS: hpux11.00 > > > Compiler: gcc > > > ... > > > My version

Re: undefined reference to `__strtoll'

2010-02-12 Thread Dave Moore
How do I configure the linker to use the system linker instead of gnu LD? I really appreciate the replies! -dave On Thu, Feb 11, 2010 at 15:49, Greg Wooledge wrote: > On Thu, Feb 11, 2010 at 12:58:46PM -0500, Dave Moore wrote: > > Machine: hppa2.0w > > OS: hpux11.00 > > Compiler: gcc > > > Bas

Re: undefined reference to `__strtoll'

2010-02-12 Thread Dave Moore
Hi, So how do I compile the 32-bit version of bash? Should I uninstall the GCC compiler I have and goto 3.4.6 like an earlier poster? -dave On Thu, Feb 11, 2010 at 16:43, Bob Proulx wrote: > Greg Wooledge wrote: > > Dave Moore wrote: > > > Machine: hppa2.0w > > > OS: hpux11.00 > > > Compil

Re: Is there a special variable for the directory where the script is in?

2010-02-12 Thread Andreas Schwab
Greg Wooledge writes: > And testing: > > imadev:~$ file=$HOME/x > imadev:~$ link=$(command ls -l -- "$file"; printf x) > imadev:~$ link=${link%$'\nx'} > imadev:~$ remove="$file -> " > imadev:~$ file=${link#*$remove} This lacks a pair of quotes (${link#*"$remove"}). Testcase: 'x[

Re: Is there a special variable for the directory where the script is in?

2010-02-12 Thread Bernd Eggink
Am 12.02.2010 15:39, schrieb Greg Wooledge: On Fri, Feb 12, 2010 at 02:53:39PM +0100, Bernd Eggink wrote: I once wrote a more generic shell function for this purpose, see: http://sudrala.de/en_d/shell-getlink.html You note that it doesn't handle names containing ->, which is true. I'll get

Re: declare -c still undocumented.

2010-02-12 Thread DennisW
On Feb 12, 2:10 am, Mikael Fridh wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' > -DCON

Re: Circulate matches in command completion?

2010-02-12 Thread Chet Ramey
On 2/12/10 11:47 AM, Peng Yu wrote: >> The combination of those two commands does exactly what you want in >> bash-4.1. Menu completion on previous versions of bash behaves >> differently. > > My bash is of the following version. I guess this is the reason what > the command is not working? > >

Re: Is there a special variable for the directory where the script is in?

2010-02-12 Thread Bob Proulx
Greg Wooledge wrote: > That leaves names which contain ->. The tricky part here is that we > can't easily tell whether an extra -> is in the symbolic link or in > the target. > > imadev:~$ ln -s tmp 'x -> y' > imadev:~$ ln -s 'y -> tmp' x > imadev:~$ ls -ld x* > lrwxr-xr-x 1 wooledgpgmr

Re: Circulate matches in command completion?

2010-02-12 Thread Peng Yu
On Fri, Feb 12, 2010 at 10:43 AM, Chet Ramey wrote: > On 2/11/10 6:14 PM, Peng Yu wrote: > >> bind 'set show-all-if-ambiguous On' >> bind 'TAB:menu-complete' >> >> I typed the above commands in the command line, but I still don't see >> the print out of all matches. Would you please let me know ho

Re: Circulate matches in command completion?

2010-02-12 Thread Chet Ramey
On 2/11/10 6:14 PM, Peng Yu wrote: > bind 'set show-all-if-ambiguous On' > bind 'TAB:menu-complete' > > I typed the above commands in the command line, but I still don't see > the print out of all matches. Would you please let me know how to > debug what is wrong? The combination of those two co

Re: Is there a special variable for the directory where the script is in?

2010-02-12 Thread Greg Wooledge
On Fri, Feb 12, 2010 at 02:53:39PM +0100, Bernd Eggink wrote: > I once wrote a more generic shell function for this purpose, see: > http://sudrala.de/en_d/shell-getlink.html You note that it doesn't handle names containing ->, which is true. I'll get back to that at the end. It also won't handl

Re: process substitution and trailing file descriptors

2010-02-12 Thread Ian
On 11 Feb, 20:29, Greg Wooledge wrote: > When the shortcuts are too short, you need to fall back to the original > tools.  In this case, >() is really just a shortcut for "create a FIFO, > and open it".  Doing so by hand should give you the manual control you > need.  At the very least, you can te

declare -c still undocumented.

2010-02-12 Thread Mikael Fridh
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE

Re: Is there a special variable for the directory where the script is in?

2010-02-12 Thread Bernd Eggink
Am 12.02.2010 14:38, schrieb Guillaume Outters: Greg a écrit : Except that HP-UX 10.20 and HP-UX 11.11 don't have readlink(1). (Maybe it's added in 11.2x? I don't know.) You're right. I must admit I made a concession to some GNU coreutils tools on the platform. I once used some ls -l "$SCRI

Re: Is there a special variable for the directory where the script is in?

2010-02-12 Thread Guillaume Outters
Greg a écrit : > Except that HP-UX 10.20 and HP-UX 11.11 don't have readlink(1). > (Maybe it's added in 11.2x? I don't know.) You're right. I must admit I made a concession to some GNU coreutils tools on the platform. I once used some ls -l "$SCRIPTS" | sed -e 's/.* -> //' magic to replace it

Re: Is there a special variable for the directory where the script is in?

2010-02-12 Thread Greg Wooledge
On Fri, Feb 12, 2010 at 11:56:49AM +0100, Guillaume Outters wrote: > > I usually begin all my scripts with this beast: > > absolutiseScripts() { SCRIPTS="$1" ; echo "$SCRIPTS" | grep -q ^/ || > SCRIPTS="`dirname "$2"`/$SCRIPTS" ; } ; absolutiseScripts "`command -v "$0"`" > "`pwd`/." ; while [ -

Re: process substitution and trailing file descriptors

2010-02-12 Thread Marc Herbert
Ian wrote: > The manual suggests I could move and close file descriptors with > > [n]>&digit- > > but I would need the equivalent of > > command1 >&>(...)- > > Digit might very well mean (just a) digit but here the process > substitution, of course, is replaced with /dev/fd/63, say, certai

Re: Is there a special variable for the directory where the script is in?

2010-02-12 Thread Guillaume Outters
Marc a écrit : >source $(dirname "$0")/functions.sh I usually begin all my scripts with this beast: absolutiseScripts() { SCRIPTS="$1" ; echo "$SCRIPTS" | grep -q ^/ || SCRIPTS="`dirname "$2"`/$SCRIPTS" ; } ; absolutiseScripts "`command -v "$0"`" "`pwd`/." ; while [ -h "$SCRIPTS" ] ; do a

Re: Is there a special variable for the directory where the script is in?

2010-02-12 Thread Marc Herbert
pk a écrit : > Peng Yu wrote: > >> $0 gives the file name of the script. I could use several shell >> command to get the directory where the script is in. But I'm wondering >> if there is an easy-to-use variable that refers to the directory where >> the script is in? > > See this page: > > http: