Sponsored Content
Top Forums Shell Programming and Scripting sed command inside paramiko python Post 302990625 by Priya Amaresh on Sunday 29th of January 2017 02:55:16 PM
Old 01-29-2017
It worked this way finally when i used sed command inside paramiko python..
Code:
        grpRem = "sed -i -E 's/paste=used//g' /etc/gr.txt"

Its surprising that my try worked Smilie

Last edited by Priya Amaresh; 01-29-2017 at 03:56 PM.. Reason: Code seems messy
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use refrence values inside sed command

I am using script S_db=`grep SRC_DB= ${login_txt} | cut -d= -f2` T_db=`grep TGT_DB= ${login_txt} | cut -d= -f2` today=`date +%Y%m%d` sed 's/USER_WORK/RAR_WORK_D1/g' < ${my_path}/files/${T_target}_${today}_DDL.txt > ${my_path}/files/temp9 But when I am trying to remove hardcode values... (1 Reply)
Discussion started by: scorp_rahul23
1 Replies

2. Shell Programming and Scripting

Need help in sed command ( Replacing a pattern inside a file with a variable value )

Hello, The following sed command is giving error sed: -e expression #1, char 13: unknown option to `s' The sed command is echo "//-----" | sed "s/\/\/---*/$parChk/g" where parChk="//---ee-" How can i print the variable value from sed command ? And is it possible to replace a... (2 Replies)
Discussion started by: frozensmilz
2 Replies

3. Shell Programming and Scripting

sed command not working inside ksh script but works fine outside

Hi, I am a bit confused ,why would a sed command work fine outside of ksh script but not inside. e.g I want to replace all the characters which end with a value and have space at end of it. so my command for it is : sed -i "s/$SEPARATOR /$SEPARATOR/g" file_name This is working fine in... (8 Replies)
Discussion started by: vital_parsley
8 Replies

4. Shell Programming and Scripting

[Python] Search a file with paramiko

I need to compare the output files in a directory for sftp, looking through a mask. Return the full file name. Eg. I have a file named locally: test.txt I must check through sftp, if a file with the following name: test_F060514_H173148.TXT My idea is for the filename to a... (0 Replies)
Discussion started by: Jomeaide
0 Replies

5. Shell Programming and Scripting

Paramiko Script

Hi Geeks, I have the following python script. #!/usr/bin/python #Script to pull KPI values from MMEs. import paramiko import sys import os host = sys.argv user = sys.argv password = sys.argv ssh = paramiko.SSHClient() (8 Replies)
Discussion started by: infinitydon
8 Replies

6. Shell Programming and Scripting

Executing sed command inside a bash script

I want to run commands inside a bash script. An example is I want to pass the command in a string as regexp as an argument to the script, then run sed on the bash variable sed.sh regexp sed.sh "-i \"s/<p>//g\"" then call sed "$regexp" $fl (3 Replies)
Discussion started by: Kangol
3 Replies

7. Programming

Search or find a element inside list python

I have a list as follows: From this i need to grep the element using keyword as "primary" and return output as 12:13-internet-wifi-primary i used as follows if (i <= (len(system_info))): ss = system_info print... (5 Replies)
Discussion started by: Priya Amaresh
5 Replies

8. Programming

Create a C source and compile inside Python 1.4.0 to 3.7.0 in Python for ALL? platforms...

Hi all... As you know I like making code backwards compatible for as many platforms as possible. This Python script was in fact dedicated for the AMIGA A1200 using Pythons 1.4.0, 1.5.2, 1.6.0, 2.0.1, and 2.4.6 as that is all we have for varying levels of upgrades from a HDD and 4MB FastRam... (1 Reply)
Discussion started by: wisecracker
1 Replies

9. Programming

Python Paramiko multi threading to capture all output for command applied in loop

My issue : I am getting only last command output data in ouput file. Though comamnd "print(output)" displays data for all 3rd column values but the data saved in file is not what required it hs to be the same which is being printed by command"print(output)". Could you please help me to fix this,... (0 Replies)
Discussion started by: as7951
0 Replies
syscallbyproc.d(1m)						   USER COMMANDS					       syscallbyproc.d(1m)

NAME
syscallbyproc.d - syscalls by process name. Uses DTrace. SYNOPSIS
syscallbyproc.d DESCRIPTION
syscallbyproc.d is a DTrace OneLiner to a report of the number of system calls made by process name. This is useful to identify which process is causing the most system calls. Docs/oneliners.txt and Docs/Examples/oneliners_examples.txt in the DTraceToolkit contain this as a oneliner that can be cut-n-paste to run. Since this uses DTrace, only users with root privileges can run this command. EXAMPLES
This samples until Ctrl-C is hit. # syscallbyproc.d FIELDS
first field This is the process name. There may be several PIDs that have the same process name, for example with numerous instances of "bash". The value reported will be the sum of them all. second field This is the count, the number of system calls made. DOCUMENTATION
See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with ver- bose descriptions explaining the output. EXIT
syscallbyproc.d will sample until Ctrl-C is hit. AUTHOR
Brendan Gregg [Sydney, Australia] SEE ALSO
procsystime(1M), dtrace(1M), truss(1) version 1.00 May 15, 2005 syscallbyproc.d(1m)
All times are GMT -4. The time now is 10:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy