bash scripting for begginers

Discussion in 'Suggest HOWTO' started by aolex, Oct 20, 2005.

  1. aolex

    aolex New Member

    a simple tutorial for bash scripting users would be very nice and usefull . why do i need this ? i would like to create an installer and i would like to check some things ... something like (will do it in php , sorry :)) :

    $user = $USERNAME;
    if($user != 'root')
    {
    echo 'you need administrative rights to install this!';
    exit;
    }
    else
    {
    $get1 = wget http://some_link/;
    if(!$get1)
    {
    echo 'could not download package $get1';
    echo 'continue ?'
    read answer;
    if($answer == y)
    {
    wget the rest bla bla bla
    }
    else
    {
    exit;
    }

    please , this would be very usefull for me and for others ! thank you ;)
     
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

  3. aolex

    aolex New Member

    if i will make my script using that tutorial, would you take a look on it and tell me if there's something wrong (syntax)? thanks ;)
     
  4. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Why don't you simply test it? :rolleyes:
     
  5. aolex

    aolex New Member

    it's quite complicated and reading so many pages for a script is kind of much ... too much i'd say !
     

Share This Page