Read from file specific place in file using inode

Hello, I am using tcsh on AIX.
I would like to write a script that does the following:

  1. given an inode, how do I find exactly the name of the file?

I know I could do this using ls -i | grep <inode>
but it returns: <inode> <filename>. I need some string manipulation or something to retrieve just the file name.
I tried using variables, but I think variables are defined differently in tsch or something.

  1. So, 2 - how to define variables on tcsh (that is personal variables [not env]).

  2. How to retrieve number of lines written during a command?
    That is, say I activated command1 and it wrote about 200 lines - can I get the number of lines it wrote?

Thank you very much for your help!

ad 1)

ls -i | awk '/<inode>/{print $2}'

ad 3)

ls -i | wc -l