Re: I cannot use the 'cd' command in a script |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/slitaz Archives
]
> Hey!
Hi,
> Thanks for your answer.
> Do you know how i can change the current directory with a script ?
What do you want to do exactly, if you save tese line and run the
script:
=================================
#!/bin/sh
#
mkdir tmp
cd tmp
touch file
exit 0
=================================
Here it creat a tmp directory and the a empty file in it! If you not
sure with cd and paths, use variable in your scripts:
FILE="file.txt"
DEST="/home/slitaz"
cp -f $FILE $DEST
- Christophe
---
SliTaz GNU/Linux Mailing list - http://www.slitaz.org/