Linda Walsh wrote
>
> Andreas Schwab wrote:
> > Linda Walsh writes:
> >
> >>Except that in-line HERE docs don't need to be implemented
> >> through a tmp file unless you want to slow things down.
> >>They should be read out of memory and NOT transfered to
> >> to non-existent, external s
Greg Wooledge wrote:
> The 'read' example will not work as you've written it. The change to
> the shell variable 'out' will be lost when the pipeline terminates.
> (But you can get a very recent bash release and set the "lastpipe"
> shopt to work around this.)
>
> If the while loop also tries to
, version 3.2.39 a simple script (named 'a'):
#!/bin/bash
echo "$_"
prints './a' when invoked as './a'. According to the above excerpt,
should it not print an absolute path to 'a' instead?
Regards,
Angel Tsankov
rtainly a pain in the ass.
Regards,
Angel Tsankov
Hi,
Using bash 3.2.48(1)-release, echo ""~root prints ~root instead of /root.
Is this the expected behaviour?
Angel Tsankov
Chet Ramey wrote:
> Angel Tsankov wrote:
>> Hi,
>>
>> Using bash 3.2.48(1)-release, echo ""~root prints ~root instead of
>> /root. Is this the expected behaviour?
>
> Yes. The tilde is not the first character in the word. Portions of
> words to be
Jon Seymour wrote:
> There may be other ways to do this, but:
>
> CPATH="${CPATH}${CPATH:+:}$(echo ~usr1/blah/blah)"
>
> should work.
Well, I'd like to avoid the use of external commands.
--Angel
Jon Seymour wrote:
> On Mon, Feb 16, 2009 at 9:26 AM, Angel Tsankov
> wrote:
>> Jon Seymour wrote:
>>> There may be other ways to do this, but:
>>>
>>> CPATH="${CPATH}${CPATH:+:}$(echo ~usr1/blah/blah)"
>>>
>>> shou
echo ~usr1/blah/blah) on aesthetic grounds too - I welcome any
> suggested improvement!. ]
>
> jon.
Thanks for your replies,
Angel Tsankov
ommand substitution forks a separate process, so
> that can fail for reasons external to the bash process.
If process creation fails will $? will be set accordingly :-)
> Here's another possibility:
> CPATH=${CPATH:+$CPATH:}${#+~usr1/blah/blah}
That's clever!
-Angel
g any function. However, in this case
"echo $#" prints "$#"! The expansion rules are exactly two:
${parameter:+word}
(http://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameters,
3.5.3 Shell Parameter Expansion) and ${parameter} (3.5.3 Shell Parameter
Expansion)
-Angel
ich, by pure logic, seems
to be at least as often set as is $#.
-Angel
Eric Blake wrote:
> According to Angel Tsankov on 2/15/2009 3:02 PM:
>> I tried CPATH="${CPATH}${CPATH:+:}"~usr1/blah/blah. (I quote
>> expansions just to be on the safe side, though I think home
>> directories may not contain spaces.)
>
> There are some c
Dave B wrote:
> Angel Tsankov wrote:
>> Eric, thanks for youy replay. If double quotes are not that
>> portable, then how am I suppose to assign the output from some
>> command to a variable when the output contains a space?
>
> Word splitting doesn't happen on a
Hello,
I want to pass the output from one command (e.g. find) to some other command
so that each path (output by the first command) gets into a distinct
positional parameter of the second command. How can I do this if some paths
contain spaces?
What if the second command is a function defiend in a shell script, or a
bash built-in command?
Hi,
What are the valid charactes for the IFS variable? In particular, is '\0' a
valid one?
Hi,
Which program can be used to search for line-feed characters in a string
that might contain null characters?
Regards,
Angel Tsankov
Hello,
What can I do so that every directory I create has the sticky bit set?
Regards,
Angel Tsankov
7;d want to process function arguments, and remove for
> example a "-p" option before passing them along to chmod. I'll leave
> that part as an exercise.)
>
Let's say that removing '-p' is straightforward, but what about setting the
sticky bit to every newly created directory component?
Regards,
Angel Tsankov
Hello!
I'd like to pipe the output from a command, say A, to another command, say
B, then check if both commands completed successfully (i.e.with exist status
0) and, if so, compare the standard output from command B to some string.
How can I do this in a bash script?
Regards,
Angel Tsankov
The Grant Institute's Grants 101: Professional Grant Proposal Writing Workshop will
be held at the University of Illinois, Chicago,
April 18-20, 2005. Interested development professionals,
researchers, faculty, and graduate students should register as soon as
possible, as demand means that
22 matches
Mail list logo