Hi there,
I am trying to write a shell script to ssh into my server then take a msg and make an svn commit. Here what I have so far:
I run:Code:#!/bin/bash msg=0 echo -n "Please enter your commit message: " read msg if [ $msg -eq 0 ]; then echo "Your message was passed null, although your commit was successful" else echo "Commit Successful, with a message of $msg" fi ssh [email protected] svn commit -m $msg
charlie-kirks-mac-pro:shl.sh charliekirk$ bash TXT.sh
Please enter your commit message:
updates to some content
TXT.sh: line 13: [: too many arguments
Commit Successful, with a message of updates to some content
then it ssh's into my server, and then leaves me hanging, what I'd like it to do, although I know my current logic doesn't make this viable, to ssh into first, then run it, but I don't know if thats possible, oh by the way ocne it does ssh in, it presents me with a bash prompt.





lol.
Reply With Quote