This is a discussion on Why won't sripts work in REDHAT? within the Linux Administration forums, part of the Linux Forums category; I welcome any ideas and appreciate your help. Please, if you are going to tell me to RTFM, don't ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I welcome any ideas and appreciate your help. Please, if you are going
to tell me to RTFM, don't waste your time or mine and leave me alone. The RTFM command is circuitous, incomplete, and don't work for me (I read English nicely, and complete sentences go much further). I simply want to copy folders and files from a CD drive to the redhat system. Each command I have entered in the script does what I want when evetered in the terminal. The BASH command resides in /bin/, and I have set permissions on the script to everything from 700 to 777. I am logged in as root. The first command in my sript is: #!/bin/bash When run, the hard drive shows activity, the CD ROM shows activity; the system just doesn't actually DO anything (such as moving files from CD-already mounted-to the HD). Who am I kidding? I am going to get flamed anyway. :-) Thanks again, CC |
|
|||
|
On 30 Dec 2003 07:10:45 -0800, Joe Wilk wrote:
> I welcome any ideas and appreciate your help. Please, if you are going > to tell me to RTFM, don't waste your time or mine and leave me alone. > The RTFM command is circuitous, incomplete, and don't work for me (I > read English nicely, and complete sentences go much further). > > I simply want to copy folders and files from a CD drive to the redhat > system. Each command I have entered in the script does what I want > when evetered in the terminal. The BASH command resides in /bin/, and > I have set permissions on the script to everything from 700 to 777. I > am logged in as root. chmod 755 would be better than 777 > > The first command in my sript is: #!/bin/bash > > When run, the hard drive shows activity, the CD ROM shows activity; > the system just doesn't actually DO anything (such as moving files > from CD-already mounted-to the HD). > > Who am I kidding? I am going to get flamed anyway. :-) Yes, Please read http://www.catb.org/~esr/faqs/smart-questions.html put this line after the #!/bin/bash set -vx # enable debugging information and at the bottom set - # disable debugging information Do your thing and see if you can find your problem. If you have to come back here, we need you to cut/paste commands and results seen on screen to see what is going on. |
|
|||
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 On 2003-12-30, Joe Wilk <cagey_cretin@netzero.com> wrote: > I welcome any ideas and appreciate your help. Please, if you are going > to tell me to RTFM, don't waste your time or mine and leave me alone. Ah, a challenge! The RTFM edict is perfectly appropriate if the answer to your question is in the FM. If you're going to use linux, you'll probably either need to learn how to R the FM for yourself or pay someone to do it for you. Posting here every time you have a problem with "Please don't tell me to RTFM" is bound to get old quickly for the people who would be willing to help. Of course, in this case the FM would be man bash, which isn't always helpful. :) But next time maybe the FM would be helpful, so don't rule it out automatically. > I simply want to copy folders and files from a CD drive to the redhat > system. Each command I have entered in the script does what I want > when evetered in the terminal. If it's short why not post it? In addition you might post how you're executing the script from the command line. > The BASH command resides in /bin/, and > I have set permissions on the script to everything from 700 to 777. I > am logged in as root. You don't seem to understand permissions, then; it's unsafe to make a root-owned script world-writable. If you're running the script as root 700 would work fine, so clearly something else is wrong. At this point I doubt anyone who can't read minds would be able to tell you what's wrong without more information. - --keith - -- kkeller-usenet@wombat.san-francisco.ca.us (try just my userid to email me) AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQE/8dP7hVcNCxZ5ID8RAnXeAJwLU/DjGuil27GqgTeUKYg66mXXCgCgmb/2 02WrncnkHdUM/tqqhKK5do8= =oLdt -----END PGP SIGNATURE----- |
|
|||
|
Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> wrote in message news:<c6kssb.flf.ln@goaway.wombat.san-francisco.ca.us>...
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 2003-12-30, Joe Wilk <cagey_cretin@netzero.com> wrote: > > I welcome any ideas and appreciate your help. Please, if you are going > > to tell me to RTFM, don't waste your time or mine and leave me alone. > > Ah, a challenge! > > The RTFM edict is perfectly appropriate if the answer to your question > is in the FM. If you're going to use linux, you'll probably either need > to learn how to R the FM for yourself or pay someone to do it for you. > Posting here every time you have a problem with "Please don't tell me to > RTFM" is bound to get old quickly for the people who would be willing to > help. > > Of course, in this case the FM would be man bash, which isn't always > helpful. :) But next time maybe the FM would be helpful, so don't rule > it out automatically. > > > I simply want to copy folders and files from a CD drive to the redhat > > system. Each command I have entered in the script does what I want > > when evetered in the terminal. > > If it's short why not post it? In addition you might post how you're > executing the script from the command line. > > > The BASH command resides in /bin/, and > > I have set permissions on the script to everything from 700 to 777. I > > am logged in as root. > > You don't seem to understand permissions, then; it's unsafe to make a > root-owned script world-writable. If you're running the script as root > 700 would work fine, so clearly something else is wrong. At this point > I doubt anyone who can't read minds would be able to tell you what's > wrong without more information. > > - --keith > > - -- > kkeller-usenet@wombat.san-francisco.ca.us > (try just my userid to email me) > AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.3 (GNU/Linux) > > iD8DBQE/8dP7hVcNCxZ5ID8RAnXeAJwLU/DjGuil27GqgTeUKYg66mXXCgCgmb/2 > 02WrncnkHdUM/tqqhKK5do8= > =oLdt > -----END PGP SIGNATURE----- Thank you Keith, My problem was that I took the manual literaly. It says that 'any text editor can be used to create shell scripts". What it does NOT say is that when you open it up in VI you may find extra charecters added courtesy of the editor you use. Foolishly, I used the gedit editor that came with redhat 9. When I realized that I had been punk'd, I edited the junk out of the file and ran it. Everything good. To other newbies: Beware, not all text is wysiwyg (what you see is what you get). Jeeezus!!! CC |
|
|||
|
Joe Wilk wrote:
> > Foolishly, I used the gedit editor that came with redhat 9. When I > realized that I had been punk'd, I edited the junk out of the file and > ran it. Everything good. > > To other newbies: Beware, not all text is wysiwyg (what you see is > what you get). Jeeezus!!! I'd be very interested in seeing what "junk" was added to the tail of the file. -- Stu |
|
|||
|
I would imagine the "junk" was a non *nix-ish carriage return/line feed
combination. I have been bit by that one myself when moving text files between Windows and Linux. -------------------------- Andy Smith, MCP wasmith32@earthlink.net -------------------------- Stuart Fuller wrote: > Joe Wilk wrote: > >>Foolishly, I used the gedit editor that came with redhat 9. When I >>realized that I had been punk'd, I edited the junk out of the file and >>ran it. Everything good. >> >>To other newbies: Beware, not all text is wysiwyg (what you see is >>what you get). Jeeezus!!! > > > I'd be very interested in seeing what "junk" was added to the tail of the > file. > |
|
|||
|
On 30 Dec 2003 14:20:10 -0800, cagey_cretin@netzero.com (Joe Wilk)
wrote: >My problem was that I took the manual literaly. It says that 'any text >editor can be used to create shell scripts". What it does NOT say is >that when you open it up in VI you may find extra charecters added >courtesy of the editor you use. Generally, that's true. Of course, it needs to be able to generate UNIX end-of-line characters (unlike Windows files and Macintosh files and Apple II files). However, you must use a _text_editor_ and not a _word_processor_. MacWrite is a word processor; so is Microsoft Word and AbiWord and many others. vi and emacs and pico and others are text editors. I'd stick with vi; it's the best anyway. (duck and run!) If you like, you could use gvim which gives you a graphical interface on top of vi with menu items, et al. David Douthitt (david@douthitt.net) UNIX System Administrator HP-UX, Unixware, Linux Linux+, LPIC-1 |