What is the syntax for specifying a dynamic profile name in linux command? E.g.
perl genhtml /home/$(usrProfile)/*
What is the syntax to replace usrProfile if it is dynamic?
Thanks.
EDIT: I’m running this in Windows Command line under cygwin.
UPDATE: I have tried doing the following:
$ECHO $HOME
chmod 444/home/~username/*
But I’ve gotten the error saying
No such file or directoryine 1: /home/Administrator
chmod: cannot access '/home/~username/*': No such file or directory
The only profile I have in the cygwin’s home directory is Administrator so the directory exists physically.
My goal is to be able to call the above command without worrying profile name either directly in a build script (MsBuild), or via cygwin’s bash command.
Thanks.
Edit:
In your update, I’m assuming you’re not typing the dollar sign before the
echo. Also, I would use lowercase for commands, even though they work under Cygwin – they won’t elsewhere. There needs to be a space after the permission setting. Plus, I doubt there’s a tilde in the actual username. And are you really sure you want to blindly set all the files to the same permission? What if there are existing files?What you probably really want to do is something more like:
or