01-14-2012
how to give PATH to DSM ..............
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a solaris9 x86 server using ssh as follows:
SSH Version Sun_SSH_1.0, protocol versions 1.5/2.0.
The remote server solaris9 sparc has exactly the same version ssh installed.
I am running a script on my server which includes the following command to run a script on the remote server:... (4 Replies)
Discussion started by: frustrated1
4 Replies
2. Shell Programming and Scripting
Hi All,
i have two machines like x and y . my requirement is i should connect to machine Y from x through ssh connection . and do some operation such as copy and move and delete files in Y machine .
i tried with this code but it is doing in machine x only . and i need to exit from Y when... (1 Reply)
Discussion started by: rateeshkumar
1 Replies
3. Shell Programming and Scripting
Hi I am working in a java application. I need to execute a perl script(linux) which is in remote machine in java application from local machine(windows). I need to do this process automatically that is without manual intereption. Now I will explain the process clearly, at present to run the... (1 Reply)
Discussion started by: bassma
1 Replies
4. Shell Programming and Scripting
Scenario:
I currently manager a cluster at work which is on a private network and i constantly need to ssh to other clients for diags e.t.c. I created a debain client which i use as my gateway to get to all the clients on the private network and I then created a Shell menu script which will make... (4 Replies)
Discussion started by: defamer
4 Replies
5. UNIX for Advanced & Expert Users
Not able to execute the file in remote host using except utility
I am automating the SFTP keys setp process:
So i created the expect script for controlling the output of shell
below is my main code:
Code:
#!/usr/bin/expect
set fd
set password
close $fd
set df
set app
close $df... (1 Reply)
Discussion started by: Manoj Bajpai
1 Replies
6. Shell Programming and Scripting
I need to run a local shell script on a remote machine. I am able to achieve that by executing the command
> ssh -qtt user@host < test.sh
However, when I try to pass arguments to test.sh it fails.
Any pointers would be appreciated. (7 Replies)
Discussion started by: Sree10
7 Replies
7. Red Hat
I want to SSH to 192.168.1.15 Server from my machine, my ip was 192.168.1.99
Source Destination was UP, with IP 192.168.1.15.
This is LAN Network there are 30 Machine's Connected to the network and working fine, I'm Playing around the local machine's because I need to apply the same rules in... (2 Replies)
Discussion started by: babinlonston
2 Replies
8. Linux
How to execute a script in remote machine through ssh
I have a script test.sh which does some backup activity in remote machine. Wanted to keep backup also in remote machine.
ssh -l username <remote machine> "commands to be exceuted as ; separted"
but how to put the script in the place of... (5 Replies)
Discussion started by: sanvel
5 Replies
9. Shell Programming and Scripting
I want to execute a shell script(set of commands) on remote machine and that script takes input from text file(local machine). Please refer below:
ssh user@hostname 'bash -s'< ./test.sh file.txt
But i got the error file.txt doesn't exist.
Can anyone help me on this.
Content of test.sh:
... (2 Replies)
Discussion started by: manishtri88
2 Replies
10. Ubuntu
Hello,
What I want to do is to run a file on remote server by running a script at localhost but script should not ask ssh password of my remote server when script is executed.
Scenario1:
To copy files from server2 to data server:$ scp -r root@server2_ip:/var/www/html/*.* /var/
When I enter... (6 Replies)
Discussion started by: baris35
6 Replies
Env(3pm) Perl Programmers Reference Guide Env(3pm)
NAME
Env - perl module that imports environment variables as scalars or arrays
SYNOPSIS
use Env;
use Env qw(PATH HOME TERM);
use Env qw($SHELL @LD_LIBRARY_PATH);
DESCRIPTION
Perl maintains environment variables in a special hash named %ENV. For when this access method is inconvenient, the Perl module "Env"
allows environment variables to be treated as scalar or array variables.
The "Env::import()" function ties environment variables with suitable names to global Perl variables with the same names. By default it
ties all existing environment variables ("keys %ENV") to scalars. If the "import" function receives arguments, it takes them to be a list
of variables to tie; it's okay if they don't yet exist. The scalar type prefix '$' is inferred for any element of this list not prefixed by
'$' or '@'. Arrays are implemented in terms of "split" and "join", using $Config::Config{path_sep} as the delimiter.
After an environment variable is tied, merely use it like a normal variable. You may access its value
@path = split(/:/, $PATH);
print join("
", @LD_LIBRARY_PATH), "
";
or modify it
$PATH .= ":.";
push @LD_LIBRARY_PATH, $dir;
however you'd like. Bear in mind, however, that each access to a tied array variable requires splitting the environment variable's string
anew.
The code:
use Env qw(@PATH);
push @PATH, '.';
is equivalent to:
use Env qw(PATH);
$PATH .= ":.";
except that if $ENV{PATH} started out empty, the second approach leaves it with the (odd) value "":."", but the first approach leaves it
with ""."".
To remove a tied environment variable from the environment, assign it the undefined value
undef $PATH;
undef @LD_LIBRARY_PATH;
LIMITATIONS
On VMS systems, arrays tied to environment variables are read-only. Attempting to change anything will cause a warning.
AUTHOR
Chip Salzenberg <chip@fin.uucp> and Gregor N. Purdy <gregor@focusresearch.com>
perl v5.8.0 2002-06-01 Env(3pm)