Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum

bash in need of some clarafication

Started by klein5366, January 18, 2017, 04:09:36 AM

Previous topic - Next topic


i Just installed sparkylinux-4.5.2-i686-lxqt.iso and have a previous version installed on another computer.
i'm use to ubuntu, i started with ubuntu 5.10, 10 + years ago.
i have some setup scrips i like to use like this one:

#! /bin/bash

    mkdir /usr/mysbin
    cp -r ~/install_software/my-scripts/ /usr/mysbin/
    chown root:root /usr/mysbin/
    chmod 755 /usr/mysbin/
    cp -r /etc/crontab /etc/
    echo "00 01    * * *    root    /usr/mysbin/"  >>  /etc/crontab
    touch /etc/libuser.conf   


but when i run it from the command line i get this :

lucas@lucas:~/Desktop$ sudo ./
cp: cannot stat '/root/install_software/my-scripts/': No such file or directory
chown: cannot access '/usr/mysbin/': No such file or directory
chmod: cannot access '/usr/mysbin/': No such file or directory

this script runs fine in ubuntu, and as far as i can tell both bash versions are the same, i looked at both bashrc files and they look the same.
could someone point me in the right direction ? 

View the most recent posts on the forum