I would like to assign a symbolic link for each text files from the same folder. Be more specific, let's say there are four text files in a folder.
AAAA.txt
BBBB.txt
ABAB.txt
BABA.txt
I would like to assign a symbolic link for each. For example
ln -s AAAA.txt sample1.txt
ln -s BBBB.txt sample2.txt
ln -s ABAB.txt sample3.txt
ln -s BABA.txt sample4.txt
How can I use forloop to do this?
for f in "$dir"/.txt;
do
ln -s $f sample[1,2,3,4].txt (I know this is not right !!!)
done