Link to home
Start Free TrialLog in
Avatar of gs_kanata
gs_kanataFlag for Canada

asked on

Why TCL exec chmod does not work?

From the command line, I could run the following commad without question:

chmod 755 <dir>/*

However, if I did the same thing via TCL/Expect

exec chmod 755 <dir>/*

I got the error as:

ERROR: chmod: WARNING: can't access <dir>/*

permission is not an issue. Feel like TCL does not recognize <dir> correctly.
ASKER CERTIFIED SOLUTION
Avatar of AwesomeMachine
AwesomeMachine

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Adrian Sluijters
% file attributes foobar -permissions 0755;

changing attribs is the same as using file.. man "file" and have a look at the -permissions argument :)
Avatar of gs_kanata

ASKER

file attributes does not work multiple files under certain directory in TCL language.

file attributes foodir/* -permissions 0755

will get

could not set permissions for file "foodir/*": no such file or directory
is this a specific directory? or all?