[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: A file is not always what you think it is.



That sounds suspicious.  Hmmm.  Are you sure that the permissions *and*
the ownership were set properly for *you* to execute it?  After all, a
text file is just a text file.  The only variation would be CR/LF line
endings.  In fact, the .txt extension should be no barrier to running a
script, as long as the ``shebang'' (#!...) line at the beginning is
correct.  The other thing... are you sure that the file was in your
path?  It's common practice *not* to include the working directory in
the path of user Root, for instance.  

I've never had trouble copying things via DOS diskettes, as long as the
concerns you are addressing are taken care of.  I usually use mtools.
OTOH, if you mount a DOS filesystem (preferably as a VFAT filesystem),
some of the permissions and the ownership are determined on a
by-filesystem basis, via the mount command.  (I don't recommend mounting
DOS floppies, because if you forget to unmount before removing, you've
got problems.)

Jesse

On 04/19/99 at 17:58:18, Hans van den Boogert wrote concerning "A file is not always what you think it is.":
> Follow up on the scripting problems I had... IT WORKS!!!!!!!! Of 
> course, the solution was simple and it came to me in those early 
> morning hours when you're mind is clear and creativity flows through 
> your veins: I wrote my script under Windblows 95!!!! 
> 
> Background: I have two machines: Pentium 200 desktop running Win95 and 
> a 486-33 notebook on which I installed the Debian 2.1 base system. 
> 
> What I did: 
> - write a script using Notepad under Winblows on the P200. Saved it as 
> a .txt file. 
> - copied it on a DOS formatted disk. Changed the filename to one 
> without the .txt extension. 
> - copied it on my notebook in the directory /root 
> - chmod it, and ran it with the result "file not found" 
> 
> Apparently a .txt file written under Win95 can be chmod-ed, but not 
> executed. I used ae to write a simple script from scratch under Linux 
> and it worked no problem at all. 
> 
> That makes me wonder: I have to install some packages on the notebook 
> to get the external CD-ROM drive working. If I copy them from the 
> CD-ROM on a DOS formatted floppy and then transfer to the notebook, 
> will I get the same kind of trouble?  
> 
> P.S. This is new to me: I can use apt to install a single package, 
> isn't it? Or do I still have to use dpkg. Basic question, I know, but I 
> did so much reading/researching that my mind is getting a Linux 
> overload right now. Still having fun, though. 
> 
> Hans 
>  
> 

-- 
Jesse Jacobsen, Pastor          jjacobsen@jvlnet.com
Grace Lutheran Church (ELS)     http://www.jvlnet.com/~jjacobsen/
Madison, Wisconsin              GnuPG public key ID: 2E3EBF13


Reply to: