Results 1 to 5 of 5

Thread: Script does not work after installing Linux Mint

  1. #1
    Join Date
    Jan 2011
    Posts
    55

    Script does not work after installing Linux Mint

    I have recently installed Linux Mint Julia on my computer. I have restored all the stuff from the Pardus. Everything is working fine except the following script.
    Code:
    read -p "Unlock the folder now (y/n)?"
    [ "$REPLY" == "y" ] || exit
    And it displays the following error message on the screen.
    Code:
    read: 3: arg count
    [: 4: unexpected operator
    Well above mentioned script is working fine on the Pardus. Please let me know what is wrong on the above mention script? Please let me know if you are having any solution with you. I will appreciate for your reply.

  2. #2
    Join Date
    Nov 2009
    Posts
    1,416

    Re: Script does not work after installing Linux Mint

    Well above mentioned script is working properly on my system. I want to know whether you are using bash on your system. Also I want to know whether you have overridden the read command. Well I also want to know that what happens when you type help read on the terminal. I think it should work if you a have installed bash on your system. If all the above instruction does not work for you then you should run the ‘which read’ command on the terminal to check the path of the executed file. I hope it will help you to solve your problem.

  3. #3
    Join Date
    Nov 2009
    Posts
    1,292

    Re: Script does not work after installing Linux Mint

    I hope below mentioned instructions will help you out to solve the problem. Well I think you have to delete the link /bin/sh from your computer. I think you have to install bash using the package manager on your computer. Now you have to copy paste following piece of the code on the terminal. Above mentioned code will set up you default shell to bash. Please let me know about your experience so other users on this forum can learn from it.

  4. #4
    Join Date
    Nov 2009
    Posts
    1,269

    Re: Script does not work after installing Linux Mint

    Well I think there is a permission issue with the file. I want to know whether you have tried to run the script by log in into terminal as a root. Also I want to know whether there is correct permission is assigned to the file. You can check the permission by right clicking on the file. Well I also wanted to know whether you have run the script using sudo command. Finally I want to tell you if the above mentioned steps are not working then I think you have to change the permission of the script file .You can use chmod command to change the file permission.

  5. #5
    Join Date
    Apr 2009
    Posts
    1,108

    Re: Script does not work after installing Linux Mint

    Well I got the root cause of the problem. I was running sh script instead of bash script. I do not why it was working on the Pardus. Now I have changed sh script with bash and now I can run the script on the Linux Mint. Well I want to say thanks to all of you for your support and understanding. I really want to appreciate your efforts that you have put in. Thanks a lot for helping in this situation. Appreciated!

Similar Threads

  1. Some step to consider before installing Linux mint
    By EveryWer in forum Operating Systems
    Replies: 8
    Last Post: 17-11-2011, 04:59 AM
  2. Installing jdk-6u20-linux-x64.bin in Linux Mint 11
    By Gurjari in forum Operating Systems
    Replies: 5
    Last Post: 10-11-2011, 07:16 PM
  3. Add conky script to home partition in Linux Mint
    By HALLBJORN in forum Windows Software
    Replies: 4
    Last Post: 14-01-2011, 09:23 AM
  4. Installing UNetbootin in Linux Mint 10
    By $Herbert$ in forum Operating Systems
    Replies: 3
    Last Post: 04-01-2011, 03:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •