Here is the drill,
I am using a script to login to a remote ftp, and put and get files. My question is: I want to login and automatically change to the same directory I am in on my machine. I can not use $home, pwd or anyother env variable (that I know) since the names of the machines are totally different.
So, how can I know my relative directory path? ~/files/mac for instance.
I forgot to mention, I have the same directory tree on moth machines, so I have to copy the files to the same dir. (I will execute the script from the directory I want the file to be copied to)
I did read this thread: script for ftp commands and this is exactly the script I am using, and it's great.
It's not answering my question.
user name: saarma
My local fill dir (pwd) is: sbusr13.n005/sbms/csm/saarma/Scripts
user name: sm3344
and my remote is: donald.d013/sbms/csm/sm3344/Scripts
so if I want to copy a file from home to remote, I can't use the pwd path, as it's not the same.
I need to know how to get the entire path after the user name.
All what's after: '~'