Sponsored Content
Full Discussion: Run awk command inside ssh
Top Forums UNIX for Advanced & Expert Users Run awk command inside ssh Post 303041661 by MadeInGermany on Sunday 1st of December 2019 05:38:05 AM
Old 12-01-2019
With my proposal the remote shell (e.g. bash) runs the input stream - no need to copy/delete any files.
You can even use parameters:
Code:
ssh remotehost /bin/bash -s arg1 arg2 < remotescript.sh

arg1 and arg2 are passed to $1 and $2, respectively.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to run a command in different machine using SSH

how to run a command in different machie in my case script will runs in solaries machine.. in one instance it has to run a command in different machine with different operating system ( linux ) using SSH command i tried ssh -l (login_name) (machine name/host ) " command " but it is... (3 Replies)
Discussion started by: mail2sant
3 Replies

2. Shell Programming and Scripting

Run the command inside perl script

I have a command which will run fine in a unix command prompt. Can you tell how to interprete this command inside perl script...... The command is : perl -pe 's/(\|333\}.*)\}$/$1|1.6}/' FIA.txt This will search for the number 333 and appends 1.6 at the end of that line....... (1 Reply)
Discussion started by: vinay123
1 Replies

3. Solaris

Run command on sc via ssh

when i run a command on ALOM via ssh i get following error ssh root@10.23.12.51 showhosts Password: Waiting for daemons to initialize... Daemons ready shell: Invalid credentials how can i run commands without actually loging to the sc (3 Replies)
Discussion started by: fugitive
3 Replies

4. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

5. Shell Programming and Scripting

Using ssh command inside a script

Hi, I have a script file in server A. Inside the script file, I first have a ssh command that will connect to a remote server B. In the same script file itself, I have a sequence of commands that has to be run in server B. I am embedding these commands in the script file that I have in server A.... (2 Replies)
Discussion started by: mick_000
2 Replies

6. Shell Programming and Scripting

run command with ssh[solved]

Hi all, Is it possible to make this possible ? $ echo $SKY_HOME /var/sink/SKY $ echo $SKY_HOME /home/smily/SKY $ ssh root@xyz "echo $SKY_HOME" root@xyz 's password: ****** /home/smily/SKY wrong output I was expecting the output as /var/sink/SKY (3 Replies)
Discussion started by: linuxadmin
3 Replies

7. Shell Programming and Scripting

Bash- Command run from script does not pass full parameters with spaces inside

There's a JavaScript file that I call from command line (there's a framework) like so: ./RunDiag.js param1:'string one here' param2:'string two here' I have a shell script where I invoke the above command. I can run it in a script as simple as this #!/bin/bash stuff="./RunDiag.js... (4 Replies)
Discussion started by: AcerAspirant
4 Replies

8. Shell Programming and Scripting

Unable to run command after ssh

Hello, I am trying to create a ksh script to login to server and collect gather output of some command to troubleshoot some issue. DATE=`date +%b.%d.%Y.%M.%H` echo " Enter emp id to login to server" read Eid Eid=$Eid echo " Enter hostname of the system" read HOST HOST=$HOST... (2 Replies)
Discussion started by: saurabh84g
2 Replies

9. Shell Programming and Scripting

Run bash command inside zsh script

Hi, I would like to run following code in bash inside a zsh script. (In this case is output unfortunately very different if you run it in zsh). I tried to put "bash" in front of the code but I obtained following error message "bash: do: No such file or directory " eve though I merged the whole... (7 Replies)
Discussion started by: kamcamonty
7 Replies

10. Shell Programming and Scripting

Listen sharp time to run a command inside a script

Hello, Just wondered if there is any possibility to run a command at sharp time inside a script in linux. My question is not about crontab Example: #!/bin/bash cd /home/database for i in * do command 1 if time is 19:00, day is Monday then run command2 if time is 20:00, day is... (10 Replies)
Discussion started by: baris35
10 Replies
ddi_intr_add_handler(9F)												  ddi_intr_add_handler(9F)

NAME
ddi_intr_add_handler, ddi_intr_remove_handler - add or remove interrupt handler SYNOPSIS
#include <sys/types.h> #include <sys/conf.h> #include <sys/ddi.h> #include <sys/sunddi.h> int ddi_intr_add_handler(ddi_intr_handle_t *h, ddi_intr_handler_t inthandler, void *arg1, void *arg2); int ddi_intr_remove_handler(ddi_intr_handle_t h); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). ddi_intr_add_handler() h Pointer to the DDI interrupt handle inthandler Pointer to interrupt handler arg1 First argument for the interrupt handler arg2 Second, optional, argument for the interrupt handler ddi_intr_remove_handler() h DDI interrupt handle The ddi_intr_add_handler() function adds an interrupt handler given by the inthandler argument to the system with the handler arguments arg1 and arg2 for the previously allocated interrupt handle specified by the h pointer. The arguments arg1 and arg2 are passed as the first and second arguments, respectively, to the interrupt handler inthandler. See <sys/ddi_intr.h> for the definition of the interrupt handler. The routine inthandler with the arguments arg1 and arg2 is called upon receipt of the appropriate interrupt. The interrupt handler should return DDI_INTR_CLAIMED if the interrupt is claimed and DDI_INTR_UNCLAIMED otherwise. The ddi_intr_add_handler() function must be called after ddi_intr_alloc(), but before ddi_intr_enable() is called. The interrupt must be enabled through ddi_intr_enable() or ddi_intr_block_enable() before it can be used. The ddi_intr_remove_handler() function removes the handler association, added previously with ddi_intr_add_handler(), for the interrupt identified by the interrupt handle h argument. Unloadable drivers should call this routine during their detach(9E) routine to remove the interrupt handler from the system. The ddi_intr_remove_handler() function is used to disassociate the handler after the interrupt is disabled to remove dup-ed interrupt han- dles. See ddi_intr_dup_handler(9F) for dup-ed interrupt handles. If a handler is duplicated with the ddi_intr_dup_handler() function, all added and duplicated instances of the handler must be removed with ddi_intr_remove_handler() in order for the handler to be completely removed. The ddi_intr_add_handler() and ddi_intr_remove_handler() functions return: DDI_SUCCESS On success. DDI_EINVAL On encountering invalid input parameters. DDI_FAILURE On any implementation specific failure. CONTEXT
The ddi_intr_add_handler() and ddi_intr_remove_handler() functions can be called from kernel non-interrupt context. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ attributes(5), attach(9E), detach(9E), ddi_intr_alloc(9F), ddi_intr_block_enable(9F), ddi_intr_disable(9F), ddi_intr_dup_handler(9F), ddi_intr_enable(9F), ddi_intr_free(9F), ddi_intr_get_supported_types(9F), mutex(9F), mutex_init(9F), rw_init(9F), rwlock(9F) Consumers of these interfaces should verify that the return value is not equal to DDI_SUCCESS. Incomplete checking for failure codes could result in inconsistent behavior among platforms. If a device driver that uses MSI and MSI-X interrupts resets the device, the device might reset its configuration space modifications. Such a reset could cause a device driver to lose any MSI and MSI-X interrupt usage settings that have been applied. The second argument, arg2, is optional. Device drivers are free to use the two arguments however they see fit. There is no officially rec- ommended model or restrictions. For example, an interrupt handler may wish to use the first argument as the pointer to its softstate and the second argument as the value of the MSI vector. 22 Apr 2005 ddi_intr_add_handler(9F)
All times are GMT -4. The time now is 07:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy