[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[50 character or so descriptive subject here (for reference)]
From: |
Mario V Nigrovic |
Subject: |
[50 character or so descriptive subject here (for reference)] |
Date: |
Thu, 17 Jul 2003 18:10:17 -0700 (MST) |
Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.8
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc'
-DCONF_OSTYPE='solaris2.8' -DCONF_MACHTYPE='sparc-sun-solaris2.8'
-DCONF_VENDOR='sun' -DSHELL -DHAVE_CONFIG_H -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I. -I/media/gnu/bash-2.05
-I/media/gnu/bash-2.05/include -I/media/gnu/bash-2.05/lib
-I/tools/GNU/003/SunOS_5.8/include -g -O2
uname output: SunOS jaguar 5.8 Generic_108528-22 sun4u sparc SUNW,Ultra-60
Machine Type: sparc-sun-solaris2.8
Bash Version: 2.05
Patch Level: 0
Release Status: release
Description:
It would be nice to be able to put multiple substitution
expressions into a single expansion. This may be impossible,
but then I won't know if I don't ask.
It seems syntatically logical to be able to use extra { and }
to allow a variable expansion to be parsed multiply. This
could quickly get confusing, though. Anyway, say I want to
chop both the path and the extension off a filename:
file=/tmp/this/path/is/long/to/file.txt
It seems logical to be able to use
${{file##*/}%.*}
rather than resorting to intermediate variables:
temp=${file##*/}
${temp%.*}
This is primarily valuable when used in a for expression,
where you currently only get one expansion on the iteration
list.
Thanks,
Mario