On Mon, 13 Dec 2004, Ronald KA4INM Youvan wrote:
> >> I use script files in mc to range every file in a directory and they
> >>change the ownership and attributes for security reasons.
>
> > Why use mc? Why not "fild /home/user/{PIX,PDF,DOC} -type f"?
>
> Because I am using mc as a file manager and as part of the copying
> and moving I run this script.
>
> Slackware doesn't contain "fild".
Typo. It should be "find".
Anyhow, you can run stuff from within mc.
> > What do $1, $2, $3, and $4 contain?
>
> It's the parts of the filename such as:
> " Cliff Edwards - Hard-Hearted Hannah 1924.mp3 "
So $1="Cliff", $2="Edwards", $3="-", $4="Hard-Hearted"? Sounds like you
need to change how this script is being invoked by mc from
/usr/local/bin/myscript %1
to
/usr/local/bin/myscript "%1"
(adjust to taste)
then put quotes around space-containing variables in your script.
> > Test with "echo chmod $whatever", until you're sure it's right.
>
> In mc when the left panel is set to "Info" the left panel shows
> the ownership and attributes of the selected file on the right.
> The script command changes things properly, it's just that
> file names with spaces fail to be included in the "batch" process.
What I mean, is that when testing a new script, do this _first_ until you're
sure it's right, rather than screw up stuff again.
-- -eben ebQenW1@EtaRmpTabYayU.rIr.OcoPm home.tampabay.rr.com/hactarThey that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Ben Franklin
----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.
This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 17:38:26 EDT