I am new and I have small problem and I couldn't solve it by myself. Here is the issue that I am faced with:
I am trying to find the files with spaces in their names.
This part is working:
find $(pwd) -type d |grep " "
Then I am using the
awk
to print whole file name and change it with desired group name "manually typing"find $(pwd) |grep " " |awk '{print "changegrp developers \""$0"\""}'
When I try to make group name
developers
as a variable, it is not really working as expected.find $(pwd) |grep " " |awk group="developers" '{print "changegrp group \""$0"\""}'
I really don't understand the syntax. how it is possible that manually typed group is working and when I make it a variable, it is working. I know that kind of things can give some headaches due to forgetting one single quote or double quotes etc.
Could you please point me out where I am making wrong?