getinfo.sh script not working (Newbie)

General support questions
Post Reply
User avatar
Loop333
Posts: 7
Joined: 2014/08/07 08:06:39

getinfo.sh script not working (Newbie)

Post by Loop333 » 2014/08/10 01:30:52

HI everybody. I'm a very new newbie (sorry) and have some problems trying to use the getinfo.sh script.
right-click and do "Save Link As ..." to save it to a local directory.
I've save it in my desktop as "getinfo.sh".
Change the permissions to make it executable and run it:

Code: Select all

chmod +x getinfo.sh
    ./getinfo.sh
This is what I get in my terminal:

Code: Select all

[root@localhost ~]# chmod +x getinfo.sh
[root@localhost ~]# ./getinfo.sh
chmod: cannot access ‘getinfo.sh\r./getinfo.sh’: No such file or directory
:?:

Thanks in advance.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: getinfo.sh script not working (Newbie)

Post by gerald_clark » 2014/08/10 02:51:57

Run those two commands manually.
It looks like you are trying to run a two line file saved in windows format

User avatar
Loop333
Posts: 7
Joined: 2014/08/07 08:06:39

Re: getinfo.sh script not working (Newbie)

Post by Loop333 » 2014/08/10 09:38:49

Thanks for your reply. It seems that I'm getting the same result:

First:

Code: Select all

[root@localhost ~]# chmod +x getinfo.sh
(nothing happens :?: )

and then

Code: Select all

[root@localhost ~]#         ./getinfo.sh
chmod: cannot access ‘getinfo.sh\r./getinfo.sh’: No such file or directory
Obviously I'm doing something wrong, but what...

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: getinfo.sh script not working (Newbie)

Post by TrevorH » 2014/08/10 12:20:59

I think you have saved the file as a weird name with embedded carriage return characters in the name. Try running mv ./get<tab><tab> getinfo.sh where teh first getinfo.sh is entered by using tab completion and the second one is manually typed. After that, retry running it.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
Loop333
Posts: 7
Joined: 2014/08/07 08:06:39

Re: getinfo.sh script not working (Newbie)

Post by Loop333 » 2014/08/10 13:27:11

I copypasted the code:

Code: Select all

mv ./get<tab><tab> 
then I wrote "get" and then pressed theTab key to fill in the rest of the name:

Code: Select all

[root@localhost ~]# mv ./get<tab><tab> getinfo.sh
-bash: syntax error near unexpected token `<'
(Thanks for your patience)

Marsupilami23
Posts: 1
Joined: 2014/08/10 14:24:35

Re: getinfo.sh script not working (Newbie)

Post by Marsupilami23 » 2014/08/10 14:33:32

TrevorH did not mean for you to type "<TAB><TAB>" he meant for you to press the "Tab" key next to the "Q" key on your keyboard. Make sure you are IN the directory "getinfo.sh" was downloaded to. Usually the /home/(username)/Download. Then try the code that was provided on the site.

User avatar
Loop333
Posts: 7
Joined: 2014/08/07 08:06:39

Re: getinfo.sh script not working (Newbie)

Post by Loop333 » 2014/08/10 16:07:36

Marsupilami23 wrote:TrevorH did not mean for you to type "<TAB><TAB>" on your keyboard.
Sorry for the mistake. Howewer, I typed the second getinfo.sh both manually and with the Tab key with no success. Now, typing the code properly, I get:

Code: Select all

[root@localhost ~]# mv ./getinfo.sh
mv: missing destination file operand after ‘./getinfo.sh’
Make sure you are IN the directory "getinfo.sh" was downloaded to. Usually the /home/(username)/Download. Then try the code that was provided on the site.
I think that that is exactly the problem. The file was downloaded to the Desktop, but I don't know how to access the directory with the terminal.

User avatar
Loop333
Posts: 7
Joined: 2014/08/07 08:06:39

Re: getinfo.sh script not working (Newbie)

Post by Loop333 » 2014/08/10 16:31:02

PS: Wait, It seems that somehow it worked with /home/"username"/Desktop/getinfo.sh basic :!:

Code: Select all

[root@localhost ~]# /home/"username"/Desktop/getinfo.sh basic
Collecting system information for Basic questions. May take a few minutes.
uname...rpm...cat...getenforce...free...***

########################
Results are in the file:
*xxx *
########################

etc...


Post Reply