This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hi all! 3 week Linux noob here.
I'm writing a shell script to synchronize a local folder to my school's server, then log me into the server in the correct directory to test everything before turning it in. I know it's totally engineer of me to do, since it's a 3 second task, but I do it multiple times in a week... so why not save some time?
So far, I have the synchronization part down:
echo "Which lab number are you working on this week?"
read lab
rsync -rutv ~/BIOCOMP/LAB_$lab [email protected]:~/BIOCOMP
ssh [email protected]
All of that works really well. But I run into problems when I want to test all of my programs on the server. It turns out I can't just feed shell commands to it and expect it to work! The shell only works "locally", and any further commands I input don't run until I exit the server.
Once inside the server, I would like to run:
cd BIOCOMP/LAB_$lab
clear
ls
done
The idea being that I am now logged into the server and have a list of the programs I have written at my fingertips, ready to be tested.
How do I run programs as [email protected]?
Subreddit
Post Details
- Posted
- 8 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/linux4noobs...