jakeheis / Shout

SSH made easy in Swift
MIT License
357 stars 103 forks source link

can we send the command "nano" or "touch" to create and put the string into the created file? #51

Closed dlpigpen closed 3 years ago

dlpigpen commented 3 years ago

I am wondering whether this library can send any string into the nano or touch command to the remote server?

JamesD4 commented 3 years ago

Hey! Sorry to reply not-so directly, but have you considered using 'echo' and redirecting the output to said file? For example...

echo 'james' > myname

Technically you could probably spin up a full TTY and automate nano but there's really no need in most situations unless you're trying to do something extremely specific.

--James (I'm also not the dev of this repository. Just chipping in 👍 )

jakeheis commented 3 years ago

I echo what @DuffyAPP-IT said above! I'll mark this as resolved