Re: Beware of bash 3.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/29/06, Matthias Saou
<thias@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
> Stephen John Smoogen wrote :
>
> > On 4/28/06, Stephen John Smoogen <smooge@xxxxxxxxx> wrote:
> >
> > > > cat <<EOF > /etc/profile.d/java.sh
> > > > export JAVA_HOME=/opt/jre1.5.0_06
> > > > export PATH=$JAVA_HOME/bin:$PATH
> > > > EOF
> > > >

>
> Yeah, isn't the proper fix to simply single quote 'EOF'? Like this :
>
> cat << 'EOF' > /etc/profile.d/java.sh
> export JAVA_HOME=/opt/jre1.5.0_06
> export PATH=$JAVA_HOME/bin:$PATH
> EOF
>
> This should keep the $VARIABLES from being expanded in the resulting file.
>

Yes I think it is. I prefer to stay away from EOF data's because of
forgetting one thing or another can cause weird thing to happen. I
think I have used it more in Perl (and maybe Awk) than I have in
Bash/Ksh

--
Stephen J Smoogen.
CSIRT/Linux System Administrator

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux