LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash script failure in Mint 9 Isadora (https://www.linuxquestions.org/questions/linux-newbie-8/bash-script-failure-in-mint-9-isadora-910692/)

seannachie 10-28-2011 03:33 PM

bash script failure in Mint 9 Isadora
 
I've always had a permissions problem in most flavors of Linux (esp. Mint) I've used. I can set the permissions in root, but after exiting, my next action fails because for some reason the system reverts to the original set of permissions.
Now I've discovered the problem includes shell files. I can set up a shell file, save & close, then open the file again and the text is still there. Right. But when I try to run it, it stops at the >. I open the file to check it, and it's blank. Chmod doesn't work either.

yancek 10-28-2011 04:17 PM

I think you need to give an example of what you are doing. If you have a file in your /home/user directory named filename and you change to that directory in a terminal and run: sudo chmod 755 filename you should have given everyone execute permission for that file.

I'm not sure I understand the part below:

Quote:

I can set up a shell file, save & close, then open the file again and the text is still there
If you write a shell script and save it, why would you not expect the text to be there?
How are you trying to run these scripts?
Are you using bash? something else?

seannachie 10-29-2011 05:11 PM

Quote: If you write a shell script and save it, why would you not expect the text to be there?

Because I'm used to unexpected things happening. Besides, as I have stated, when the process stopped, I opened the file to check, and it was blank.

I referred to this page during this process: http://linuxcommand.org/wss0010.php

I was trying to run the ''version-check.sh' from the Linux From Scratch book. I followed the directions on the link above, but it doesn't work. At this time I can't cut/paste from a PDF, so I found the HTML version of the LFS book online and setup the file from there.

catkin 10-29-2011 11:52 PM

If you can copy and paste from the terminal, it would be helpful to show a command prompt session illustrating what is happening. After creating any files, their content could be shown with the cat command.

seannachie 10-30-2011 11:39 AM

Classic technician's syndrome. No explanation available.

jafo21369@jafo21369-desktop ~ $ chmod 755 version-check.sh
jafo21369@jafo21369-desktop ~ $ ./version-check.sh
bash, version 4.1.5(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.20.1-system.20100303
./version-check.sh: line 9: bison: command not found
yacc not found
bzip2, Version 1.0.5, 10-Dec-2007.
Coreutils: 7.4
diff (GNU diffutils) 2.8.1
find (GNU findutils) 4.4.2
./version-check.sh: line 17: gawk: command not found
/usr/bin/awk -> /usr/bin/mawk
./version-check.sh: line 21: gcc: command not found
GNU C Library (Ubuntu EGLIBC 2.11.1-0ubuntu7.2) stable release version 2.11.1
GNU grep 2.5.4
gzip 1.3.12
Linux version 2.6.32-22-generic (buildd@rothera) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #33-Ubuntu SMP Wed Apr 28 13:27:30 UTC 2010
./version-check.sh: line 26: m4: command not found
GNU Make 3.81
./version-check.sh: line 28: patch: command not found
Perl version='5.10.1';
GNU sed version 4.2.1
tar (GNU tar) 1.22
./version-check.sh: line 32: makeinfo: command not found
Texinfo:
./version-check.sh: line 33: xz: command not found
./version-check.sh: line 34: gcc: command not found
Compilation failed

*****************

At least now I know what to do next. Thanks to those who responded.

catkin 10-30-2011 11:43 AM

Glad you solved it. Threads can be marked SOLVED via the Thread Tools menu.


All times are GMT -5. The time now is 10:57 AM.