On Wed, Feb 06, 2013 at 12:39:45AM +0100, Tiwo W. wrote:
> When using this in a script of mine, I noticed that this fails
> when errexit is set ("set -e").
Most things do. set -e is crap. You should consider not using it.
> * why does it work with "set +e" ?
Because set
Do:
mkdir
cd
mkdir -p dir1/dir2
ln -s dir1/dir2 ouch
touch idontexist
ls # ^ to see dir & files & prove they really exist :P
cd ouch
ls ../ido
...
:P
I can see why this exists... this is a complex one to solve. *leaves
it to you to figure it out* xD
-i336
On 2/5/13 10:23 PM, i336 wrote:
> Do:
>
> mkdir
> cd
> mkdir -p dir1/dir2
> ln -s dir1/dir2 ouch
> touch idontexist
> ls # ^ to see dir & files & prove they really exist :P
> cd ouch
> ls ../ido
>
> ...
Filename completion uses whatever file system view -- logical or physical
-- that you have
Am 06.02.2013 14:46, schrieb Greg Wooledge:
> On Wed, Feb 06, 2013 at 12:39:45AM +0100, Tiwo W. wrote:
>> When using this in a script of mine, I noticed that this fails
>> when errexit is set ("set -e").
> Most things do. set -e is crap. You should consider not using it.
>
>>
On Wed, Feb 06, 2013 at 07:12:01PM +0100, John Kearney wrote:
> IFS= read -rd '' var2 <
> should work.
Which is essentially equivalent to doing "set +e" before, and "set -e"
again right after. In either case, you're temporarily working around
the brokenness of set -e for a single command.
On Tue, Feb 5, 2013 at 6:39 PM, Tiwo W. wrote:
> I have seen "read -d '' var" to read multi-line heredocs into
> shell variables. An empty argument to -d seemed to mean "read
> up to the end of input". And this is what it does.
>
>
In addition to all of the "don't use set
On Wednesday, February 06, 2013 01:44:04 PM DJ Mills wrote:
> On Tue, Feb 5, 2013 at 6:39 PM, Tiwo W. wrote:
>
> > I have seen "read -d '' var" to read multi-line heredocs into
> > shell variables. An empty argument to -d seemed to mean "read
> > up to the end of input". A
Chet Ramey wrote:
> i336 wrote:
> > mkdir -p dir1/dir2
> > ln -s dir1/dir2 ouch
> > touch idontexist
> > ls # ^ to see dir & files & prove they really exist :P
> > cd ouch
> > ls ../ido
> > ...
>
> Filename completion uses whatever file system view -- logical or physical
> -- that you have selecte