Search Results

Search: Posts Made By: nitinmathur18
6,845
Posted By Corona688
It's the tar file. I didn't expect a tarball...
It's the tar file. I didn't expect a tarball made on linux to be fed to a solaris system. Here are modified instructions for creating a tarball in linux that ought to work on Solaris:

mkdir...
6,845
Posted By Corona688
It runs two commands on the remote server. ...
It runs two commands on the remote server.

1) mkdir /remote/path/$ENV/whatever
2) tar -C /remote/path/$ENV/whatever -xf - < ~/file.tar

They are separated by ';', which will be fed into the...
6,845
Posted By Corona688
It's also possible to send an entire remote...
It's also possible to send an entire remote script into ssh, however:

ssh username@host exec /bin/bash -s "argument1" "argument2" < local-file.sh

Which is about equivalent to ./local-file.sh...
6,845
Posted By Corona688
You can't run local functions on a remote server....
You can't run local functions on a remote server. ssh doesn't work that way. The other side is a brand-new, independent shell, not an extension of your own. It may not even be the same shell.
...
6,845
Posted By Corona688
Yeah... calling ssh 300 times, to do 300 mkdir...
Yeah... calling ssh 300 times, to do 300 mkdir calls is a bit of a waste.

Instead of hardcoding all the paths in the script, I'd make a tarball. That will preserve permissions and let you bundle...
6,845
Posted By Corona688
Unless this mkproj_dir program actually exists on...
Unless this mkproj_dir program actually exists on the remote server, it can't run it on the remote server. This is why I demonstrated using shell commands over ssh, not running a remote script.
...
6,845
Posted By Scrutinizer
How about something like this? mkproj_dirs()...
How about something like this?

mkproj_dirs() {
mkdir -p "$1"
cd "$1" &&
mkdir archivefiles dropbox logfiles lookupfiles maestro parameterfiles rejectfiles scriptfiles sqlfiles...
6,845
Posted By Corona688
Show me exactly what you typed, please, as well...
Show me exactly what you typed, please, as well as the values of the variables involved. Leaving out any of the punctuation I gave will cause it to fail, since that's what causes ssh to do multiple...
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 07:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy