Python get the expect value from a variable


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Python get the expect value from a variable
# 1  
Old 08-21-2014
Python get the expect value from a variable

Code:
the value of the variable is 

yes
 group=bsp_16
 keyword="82599"
 test_var="-a xxx -b yyy"

I want to get output with

Code:
-a xxx -b yyy

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Python variable at different position

I have a file which records banking transactions say like below. user1 has deposited 10,000$ in his account user2 has deposited 11,000$ in his account user1 has withdraw today 5000$ from his account. Lets say i read this file and convert each line as a list. username= word action=... (1 Reply)
Discussion started by: sahil_shine
1 Replies

2. UNIX for Beginners Questions & Answers

Getting error while using date as a variable in expect

Hi getting error when i am saving date command output in a variable and then using the same variable in expect #!/usr/bin/expect set DATE spawn sftp AUT#XX.XX.XX.XX spawn echo $DATE expect "password:" send "AT123\n" expect "sftp>" send "cd /home/ \r" expect "sftp>" send... (12 Replies)
Discussion started by: scriptor
12 Replies

3. Shell Programming and Scripting

Expect Redirecting o/p to an Variable

I have a password reset expect script which stores all the op to an file. I need to check the whether password is successfully changed by greping out the file and storing the o/p to a variable. But we try to print the variable , its shows only the command instead of its o/p. ... (2 Replies)
Discussion started by: sudharson
2 Replies

4. Shell Programming and Scripting

Python update variable name in for loop

Hello all, Not sure if this question has been answered already. I have some xml Element variable as below: child19 = core_elem_dcache.find('stat') child20 = core_elem_dcache.find('stat') child21 = core_elem_dcache.find('stat') child22 = core_elem_dcache.find('stat'Next I... (2 Replies)
Discussion started by: Zam_1234
2 Replies

5. UNIX for Advanced & Expert Users

Calling expect from shell script which inturn call python

Hi Team, I have to execute a task from my local machine, where i keep my .expect,.sh, .bash and .python scripts .Task are coded in the script and has to be executed at remote machine. for that i used following task ..... SCRIPT 1: cat shell_check.sh read value if then expect... (3 Replies)
Discussion started by: Sivarajan N
3 Replies

6. Shell Programming and Scripting

Variable Substitution in Python

Hi, Please I have the following python code. x = time.strftime("%Y_%m_%d") os.system("/gsn/mme/parse_ebm_log.pl -x /gsn/mme/ -u -r gsm -f /gsn/mme/mme01/ebs/A* >> /gsn/mme/mme01/+ str(x)_gsm.txt") os.system("/gsn/mme/parse_ebm_log.pl -x /gsn/mme/ -u -r wcdma -f /gsn/mme/mme01/ebs/A* >>... (2 Replies)
Discussion started by: infinitydon
2 Replies

7. Shell Programming and Scripting

How to pass variable with spaces from shell to expect?

I need call expect script from shell script and pass values some of which could contain space. How to make expect to treat such values as one variable? (1 Reply)
Discussion started by: urello
1 Replies

8. Shell Programming and Scripting

Assigning last line to variable in expect

As part of an expect script, I have to convert a strange user ID to a conventional UNIX ID. To do this, I read the contents of a file and do a little awk magic. Here's that bit of the expect script: send "awk 'NF == 10 && \$NF == strange_user_id {print \$(NF-2)}' file_with_my_info\r" expect... (0 Replies)
Discussion started by: treesloth
0 Replies

9. Shell Programming and Scripting

passing variable to expect

Please tell me how to pass variable "a b c" to expect from the shell script 1/ example of input file # cat in-file var1 var2 a b c var4 2/ # this is my script - how to pass "a b c" as single variable ? cat in-file | while read x do my-expect x done 3/ # expect script - how to... (0 Replies)
Discussion started by: breaktime123
0 Replies

10. Shell Programming and Scripting

Transfer variable to an expect function

Hi There, I try to transfer a variable from the script to a function which use expect, but I don't succed. #!/bin/sh HPPASS1="$2" send_command() { echo "spawn ssh login@10.10.10.10" echo 'set password ' echo 'sleep 1' echo 'expect "*assword:*"'... (5 Replies)
Discussion started by: sylvainkalache
5 Replies
Login or Register to Ask a Question
xdriver(1grass) 						Grass User's Manual						   xdriver(1grass)

NAME
XDRIVER - GRASS Monitor - driver to display GRASS maps in X11 environment. (drivers) DESCRIPTION
The GRASS XDRIVER can be used to display GRASS maps in X11 environment. Usage in details Variables: GRASS_WIDTH set the x size in pixel for the XDRIVER (default: 640) GRASS_HEIGHT set the y size in pixel for the XDRIVER (default: 480) XDRIVER_TRUECOLOR=[TRUE|FALSE] Look for a TrueColor visual (?) XDRIVER_WINDOW ? XDRIVER_PRIVATE_CMAP Private color map (?) XDRIVER_LEFT defines the left position of GRASS monitor (removed?) XDRIVER_TOP define the upper position of GRASS monitor (removed?) Set the XDRIVER size # bash shell syntax: export GRASS_WIDTH=xxx export GRASS_HEIGHT=yyy # c shell syntax: setenv GRASS_WIDTH xxx setenv GRASS_HEIGHT yyy To control the XDRIVER, use the d.mon module. The maximum color depth depends on the current X Server settings. SEE ALSO
Display drivers HTMLMAP driver, PNG driver, PostScript driver d.frame, d.mon, g.region d.rast, d.vect AUTHORS
CERL various improvements from several authors. Rewritten 2001 by Glynn Clements Last changed: $Date: 2008-03-23 15:34:53 +0100 (Sun, 23 Mar 2008) $ Full index (C) 2003-2011 GRASS Development Team GRASS 6.4.2 xdriver(1grass)