06-15-2011
If you want so, then as i have posted, execute your commands one by one by seperating them with semicolon.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello Everybody,
I'm facing a weird problem with the awk command.
I'm trying to execute a simple awk command as follows,
echo 1 2 | awk '{print $2}'
This command prints the output 2.
When i try to execute the same command in a remote server using ssh as follows,
ssh user@host... (2 Replies)
Discussion started by: karthikv
2 Replies
2. Shell Programming and Scripting
Hi
I am trying to send a command over ssh with a parameter but the shell fails to expand the command properly any ideas what am i doing wrong with this.
This is ssh on AIX
for i in 71 72 73 74 75 do
for server in server1 server2 do
somestr="Some String"
echo "$server... (3 Replies)
Discussion started by: xiamin
3 Replies
3. UNIX for Dummies Questions & Answers
the ssh calling convention:
ssh <server>
If I put commands in the section, ssh will execute them immediately after logging in and return to local shell. I want to stay in the remote shell after executing these commands. How can I achieve this?
Thanks for all. (1 Reply)
Discussion started by: hplonlien
1 Replies
4. Shell Programming and Scripting
Hi,
I work on a jumpserver and I wrote a script to transfer a file from source server to destination server.
#!/bin/ksh
echo "\nEnter the file name:\n"
read name
echo "\nSelect the Source server\n"
echo "1. ODS PROD "
echo "2. ODS DROPBOX"
echo "3. ODS STE"
echo "4. ODS STE DROPBOX"... (6 Replies)
Discussion started by: ajayakunuri
6 Replies
5. Shell Programming and Scripting
Hi,
I'm tryin to write a script that will collect information about a remote servers, put them into variables and print them to screen.
# /usr/bin/bash
ls $1 > /dev/null 2>/dev/null
if
then
echo "$1 is file"
for server in $(cat $1)
do
# echo $server
... (5 Replies)
Discussion started by: moshesa
5 Replies
6. Shell Programming and Scripting
Hello,
I'm trying to create a ksh script to ssh to a remote server, enter the password and a couple commands. For security reasons I have changed the login, password and ip in my example.
#!/bin/ksh
ssh -t -t username@12.5.5.3 << EOF
password
cd bin
pwd
EOF
When I run it. It... (5 Replies)
Discussion started by: seekryts15
5 Replies
7. Shell Programming and Scripting
Hi,
I need to run a script located in a directory on remote server by using ssh authentication from my local unix server. Can anyone help me in this.
I have tried the below command. It worked for echo command but when i tried to open a file using cat command it is showing "cat: cannot open... (6 Replies)
Discussion started by: ssk250
6 Replies
8. Shell Programming and Scripting
Hi,
I am trying to run commands on a list of servers that I can ssh to and just want to know if there is a 'cleaner' way of doing this.
At the moment, I am doing as below. Is there a way that I can escape the double quote differently? If a use a single quote to enclose the commands that I... (1 Reply)
Discussion started by: newbie_01
1 Replies
9. Shell Programming and Scripting
Hi,
I need to ssh remotely to a machine and cat a file assign the value to a variable
Script:
#!/bin/bash -x
value=`cat config.txt`
echo "$value"
ssh me@xxx.host.com "valu='cat /export/home/test.md5'; echo "$valu"" | tee
Execution:
$ ./x
++ cat config.txt
+ value='touch me'
+... (5 Replies)
Discussion started by: close2jay
5 Replies
10. Shell Programming and Scripting
I have worked on multiple scenarios to execute remote script via ssh.
This problem I am not able to resolve.
2 linux hosts. Server1, Server2
on Server1 I have script called ~/scripts/start_standalone.sh
XXXX
cd $JBOSS_HOME
NODENAME=xyz; IP_ADDR=`hostname`; MGMT_IPADDR=`hostname`;... (3 Replies)
Discussion started by: oraclermanpt
3 Replies
LEARN ABOUT CENTOS
systemd-sleep.conf
SYSTEMD-SLEEP.CONF(5) systemd-sleep.conf SYSTEMD-SLEEP.CONF(5)
NAME
systemd-sleep.conf - Suspend and hibernation configuration file
SYNOPSIS
/etc/systemd/sleep.conf
DESCRIPTION
systemd supports three general power-saving modes:
suspend
a low-power state where execution of the OS is paused, and complete power loss might result in lost data, and which is fast to enter
and exit. This corresponds to suspend, standby, or freeze states as understood by the kernel.
hibernate
a low-power state where execution of the OS is paused, and complete power loss does not result in lost data, and which might be slow to
enter and exit. This corresponds to the hibernation as understood by the kernel.
hybrid-sleep
a low-power state where execution of the OS is paused, which might be slow to enter, and on complete power loss does not result in lost
data but might be slower to exit in that case. This mode is called suspend-to-both by the kernel.
Settings in this file determine what strings will be written to /sys/power/disk and /sys/power/state by systemd-sleep(8) when systemd(1)
attempts to suspend or hibernate the machine.
OPTIONS
The following options can be configured in the "[Sleep]" section of /etc/systemd/sleep.conf:
SuspendMode=, HibernateMode=, HybridSleepMode=
The string to be written to /sys/power/disk by, respectively, systemd-suspend.service(8), systemd-hibernate.service(8), or systemd-
hybrid-sleep.service(8). More than one value can be specified by seperating multiple values with commas. They will be tried in turn,
until one is written without error. If neither suceeds, the operation will be aborted.
SuspendState=, HibernateState=, HybridSleepState=
The string to be written to /sys/power/state by, respectively, systemd-suspend.service(8), systemd-hibernate.service(8), or systemd-
hybrid-sleep.service(8). More than one value can be specified by seperating multiple values with commas. They will be tried in turn,
until one is written without error. If neither suceeds, the operation will be aborted.
EXAMPLE
: FREEZE
Example: to exploit the "freeze" mode added in Linux 3.9, one can use systemctl suspend with
[Sleep]
SuspendState=freeze
SEE ALSO
systemd-sleep(8), systemd-suspend.service(8), systemd-hibernate.service(8), systemd-hybrid-sleep.service(8), systemd(1),
systemd.directives(7)
systemd 208 SYSTEMD-SLEEP.CONF(5)