Link to home
Start Free TrialLog in
Avatar of Simon336697
Simon336697Flag for Australia

asked on

Using the read function in a bash script problem

Hi guys hope you can help.

Ive got the following code snippet that is not working when using the read function.

echo -n "Enter the menu1 parent folder name that this menu2 file will reside in. This is used to create the extraction file.";
 /bin/echo;
read parent;
cd /var/www/html/simeswiki/templates;
cp extract_menu_files_menu2to4_x_from_db.php /var/www/html/simeswiki/includes/extract_menu_files_menu2to4_$parent_from_db.php;
dir /var/www/html/simeswiki/includes/extract_menu_files_menu2to4_$parent_from_db.php;;

Problem:
/var/www/html/simeswiki/includes/extract_menu_files_menu2to4_.php

Notice in the above that the $parent part is being shaved off...it is not being displayed.

Any help greatly appreciated.

ASKER CERTIFIED SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Simon336697

ASKER

Tintin,

THAT WORKS!!!!

Thanks so much mate that is perfect!

S