Re: Code for :"Re: HERE document failed && Re: /dev/fd/62: No such file or directory"

2014-07-29 Thread Angel
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

Re: Code for :"Re: HERE document failed && Re: /dev/fd/62: No such file or directory"

2014-07-29 Thread Angel
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

Special parameter $_ expands to a relative path

2011-08-31 Thread Angel Tsankov
, 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

Re: Special parameter $_ expands to a relative path

2011-09-01 Thread Angel Tsankov
rtainly a pain in the ass. Regards, Angel Tsankov

No tilde expansion right after a quotation

2009-02-15 Thread Angel Tsankov
Hi, Using bash 3.2.48(1)-release, echo ""~root prints ~root instead of /root. Is this the expected behaviour? Angel Tsankov

Re: No tilde expansion right after a quotation

2009-02-15 Thread 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

Re: No tilde expansion right after a quotation

2009-02-15 Thread Angel Tsankov
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

Re: No tilde expansion right after a quotation

2009-02-15 Thread Angel Tsankov
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

Re: No tilde expansion right after a quotation

2009-02-15 Thread Angel Tsankov
echo ~usr1/blah/blah) on aesthetic grounds too - I welcome any > suggested improvement!. ] > > jon. Thanks for your replies, Angel Tsankov

Re: No tilde expansion right after a quotation

2009-02-15 Thread 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

Re: No tilde expansion right after a quotation

2009-02-15 Thread Angel Tsankov
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

Re: No tilde expansion right after a quotation

2009-02-15 Thread Angel Tsankov
ich, by pure logic, seems to be at least as often set as is $#. -Angel

Re: No tilde expansion right after a quotation

2009-02-16 Thread Angel Tsankov
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

Re: No tilde expansion right after a quotation

2009-02-16 Thread Angel Tsankov
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

Passing paths with spaces from one command to another

2009-03-10 Thread Angel Tsankov
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?

Re: Passing paths with spaces from one command to another

2009-03-10 Thread Angel Tsankov
What if the second command is a function defiend in a shell script, or a bash built-in command?

IFS valid characters

2009-03-10 Thread Angel Tsankov
Hi, What are the valid charactes for the IFS variable? In particular, is '\0' a valid one?

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

Creating directories with sticky bit set

2009-03-12 Thread Angel Tsankov
Hello, What can I do so that every directory I create has the sticky bit set? Regards, Angel Tsankov

Re: Creating directories with sticky bit set

2009-03-12 Thread 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

Testing standard output and exit statuses from commands in a pipe

2009-04-27 Thread 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

Professional Grant writing workshop (University of Illinois, Chicago)

2005-03-21 Thread Angel Carter
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