I'm having problem making a bash script from another bash script.
The script I want to make is:
if [ ! -x "/opt/kde/bin/startkde" ]; then
The script that make that script is
# set the variables
# make the script
echo "#!/bin/sh" > $SCRIPT
echo "if [ ! -x \"$PREFIX/bin/startkde\" ]; then" >> $SCRIPT
echo " export PATH=\"$PATH:$PREFIX/bin\"" >> $SCRIPT
echo "fi" >> $SCRIPT
The result I got was not right, since the $PATH is always expanded to the env variables.
How to prefent it ?