I am using command substitution into a find command in a script where I have built a menu to do a bunch of tasks within my unix account. When I choose the options for to find a file/files that have the same inode of the entered filename, ie hardlinks, nothing shows up. When I choose the appropiate options to build my find command everything looks to be in order. I need to know how do I get the hard links to print out. Below is the segment of the menu that I use to build the find command for the find path -inum filename -print:
echo "\n Select the number of the search primary"
echo "\n 1) Search based on inodes (-inodes via filename)"
echo "\n Choice: \c"
read pchoice
case $pchoice in
1) srch_pri='-inum';;
esac
case $pchoice in
1) echo "Filename: \c";
read srch_arg;;
esac
echo "Select number of the action primary"
echo "\n 1) Display the current pathname (-print)"
echo "\n Choice: \c"
read achoice
case $achoice in
1) act_pri = '-print';;
esac
case $achoice in
1) act_arg='';;
esac
path =$HOME
find $path $srch_pri $srch_arg $act_pri $act_arg