Re: chmod 666 ///

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

 



You're not supposed to top-post on this list.  Read the guidelines for
use.


Harald Hoyer:
>> FYI
>> 
>> Here is a fixed version taken from
>> /usr/lib/rpm/rpmpopt-4.4.2.2:
>> 
>> # rpm  -qa --qf '[\[ -L %{FILENAMES:shescape} \] || chmod
>> %7.7{FILEMODES:octal} %{FILENAMES:shescape}\n]'
>> |grep -v \(none\) | grep '^. -L ' | sed 's/chmod .../chmod /'
>> | tee /dev/tty | sh


Bruce Hyatt:
> This is stretching my knowledge of bash. The main point about
> which I'm not sure is the brackets([]).
> 
> I'm accustomed to these being used for optional parts of a
> command but the apostrophe before and after the brackets makes
> me wonder. Plus the fact that brackets are used for "filename
> metacharacters" which it appears could be the case here.
> 
> Should I enter the brackets as part of the command?

Yes.  Harold gave you a sample of something to be done.

I think you're thinking about the differences between reading
instruction manual files for how to use commands (where they use certain
punctuation for indicating options that you could use, and under what
circumstances) and how you actually do use the commands.

e.g. Syntax for "command":  command [one|two|three] [four|five]
     (This is fake, I've just made it up as a simple sample.)

After the "command" you could specify an option of "one", "two", or
"three" but only one of those options.  You could also specify an
additional option of "four" or "five", and again, you could only specify
either of those options, not both.  The square brackets indicating that
you had an optional thing that you could use, the | character separating
different mutually exclusive options (representing "or").

On other computer systems that I've used, there's a variety of different
punctuation used, indication things that you could do, and things that
you had to do.

e.g. command [optional] <required parameters> {repeatable options}

Square brackets for optional parameters, so-called angle brackets for
parameters that must be supplied, and braces for parameters that can be
supplied, and can be supplied more than once (e.g such as a "verbose"
option - where each time you include it, the output becomes more and
more verbose).

That's the syntax instructions.  Within a command line, itself, you
don't type *that* punctuation.  Punctuation symbols on the command line
have their own meanings, typically as part of complex wild carding
systems, or redirecting input and output.

Quotes on command lines affect parsing of the command line, such as when
spaces need to be supplied as the parameters, but spaces would otherwise
be separators between parameters.  Likewise for other special character
sequences that you want to give to the command, rather than have your
user-interface interpret into something special, and have it give the
output of that interpretation to the command, instead.  The actual
punctuation you use will depend on the interpreter (e.g. BASH).

Backslashes are another escape mechanism.  e.g. The next character after
it is NOT to be "interpreted," it's to be sent "as is".  Or, for the
following carriage return to be ignored, and a group of lines to be
interpreted as a single line.

e.g. echo this \
     is \
     to \
     be \
     treated as one line

     is the same as:
     echo this is to be treated as one line

-- 
(This computer runs FC7, my others run FC4, FC5 & FC6, in case that's
 important to the thread.)

Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux