Re: IFS handling and read

2009-12-01 Thread Antonio Macchi

Юрий Пухальский wrote:

Good day!

Theres is a problem with a following code:

echo a:b|IFS=: read a b; echo $a



this seems work

$ echo "a:b" | { IFS=":" read a b; echo $a; }
a


Re: operators available in bash versions

2009-12-01 Thread Gerard
On 1 Dec 2009 00:05:09 GMT
Allodoxaphobia Allodoxaphobia  replied:

> You can, doncha know, install ports into $HOME?
> Ergo, you could install bash 3.x and one or more earlier versions
> in $HOME/bin/ and test your scripts to your heart's content.
> 
> I found the install 'tricks' via Google, but I don't remember the 
> keywords I succeeded with beyond 'freebsd' and 'ports' now...
> 
> I successfully installed `alpine` in my FreeBSD shell account 
> at a time when the SysAdmin only had `pine` installed.

I have neither the time, inclination to install multiple versions; nor
the morbid fasination to observe what possible system damage may
eventually occur due to that enterprise. If I were writing a script
for eventual mass distribution, I would set up multiple stations, with
various operating systems, and shell versions and do a legitimate test.
I am actually writing for in-house use. I was simply inquiring for
information since I have one of the only two PCs in my organization that
have Bash-4 installed. The others all have various versions of Bash-3.
As each unit is replace, it is updated to the latest OS and software
versions. With the economy as it is, that is not about to happen any
time soon.


-- 
Gerard
ger...@seibercom.net

|===
|===
|===
|===
|

The opulence of the front office door varies
inversely with the fundamental solvency of the firm.





Re: Doubt on variable $

2009-12-01 Thread pk
visco wrote:

> Could anyone tell me what is the purpose of $<
> 
> I found it in a Makefile as follows
>  $(CXX) $(CXXFLAGS) -c $< -o $@

That's not a bash variable. It's a Makefile variable.

http://www.gnu.org/software/make/manual/make.html#Automatic-Variables

> Also it would be nice if anyone could give a link explaining spl.
> variables used in bash

There's a "Special Parameters" section in the bash man page.



Doubt on variable $

2009-12-01 Thread visco
Could anyone tell me what is the purpose of $<

I found it in a Makefile as follows
 $(CXX) $(CXXFLAGS) -c $< -o $@

Also it would be nice if anyone could give a link explaining spl.
variables used in bash

Thanks and regards
visco