I'm trying to create a symbolic link to files with the following naming convention:
As can be seen, it has the following special characters in it: . $ ;
In my bash script I have the following lines of code:
FILE1=`find /mydir/ -name "\.\$abc\$*namehere*.zip*" | sort -rn | head -1` ln -s $FILE1 . echo "$FILE1"
When I issue the
find command by itself on the command line, I get a result displayed on screen of the file that I am interested in. However, when it is placed in the script above, the symbolic link command returns:
ln: `./.': cannot overwrite directory
And the echo command returns a blank line instead of the file name.
May I get some help as to how I can fix this in my script so that I could create a symbolic link to these files with special characters?