I'm trying to add a filename:filesfullpath
into a hidden file, so every time the user runs the script and calls in a file, the file and full file path would be added into the hidden file, presented in the following way:
filename:filepath
filename:filepath
..
I know how to get the file name and the filepath, but I don't know how to put it all in one line with the colon and into the hidden file.
I have
flink=$(readlink -e $1)
fname=$(basename $flink)
fname":"flink >> .hiddenfile
but obviously that didn't work.