I'm writing a script with a dynamic creation of a file in a directory giving by the user.
The problem now is that the user can enter whatever directory he wnts, but one file needs to be created from a template in the beginning before the creation command can execute.
I got this far:
In the template there is a creation of a database. The database place is being created dynamically by using the sed command.
The user enter the destination directory: /home/user
but in the sed command this is not accepted. How can I convert this correctly so it works.
sed "s/TEMP/$dstdir/g" $srcdir/file.st > $dstdir/file.st
Thx
YO
The problem now is that the user can enter whatever directory he wnts, but one file needs to be created from a template in the beginning before the creation command can execute.
I got this far:
In the template there is a creation of a database. The database place is being created dynamically by using the sed command.
The user enter the destination directory: /home/user
but in the sed command this is not accepted. How can I convert this correctly so it works.
sed "s/TEMP/$dstdir/g" $srcdir/file.st > $dstdir/file.st
Thx
YO