10 More Discussions You Might Find Interesting
1. Programming
I'm fairly new to scripting so this might not be possible.
I am using Expect with Cisco switches and need to capture the string after finding the expect request. For example, when I issue "show version" on a Nexus switch, I'm looking to capture the current firmware version:
#show version
... (0 Replies)
Discussion started by: IBGaryA
0 Replies
2. Shell Programming and Scripting
Hi, guys, I want to redirect the result of top command into a file after sort memory or sort TIME or sort PID or sort PCPU.
for example:
I pressed key M will sort by memory, and then press key W will save all current setting into ~/.toprc, press key q will exit when I launched top command,
It... (2 Replies)
Discussion started by: weichanghe2000
2 Replies
3. Shell Programming and Scripting
Hi,
I have been trying to change underscores to dots.
For example:
1122_91 1022_233 .
2237_23 9382_2339 2998_234
345_257 . .
Desired output:
1122.91 1022.233 .
2237.23 9382.2339 2998.234
345.257 . .
Any idea?
Thanks (4 Replies)
Discussion started by: iconig
4 Replies
4. Shell Programming and Scripting
Hello,
I will be sending this command to a specific COMID:
exp_send-i $COMID "fdisk -l | grep Disk | awk '{print $2}'"
The command will produce this output:
/dev/sda
/dev/sdb
etc..
the problem is how do I store the output in a variable in TCL,
I am currently using this to grab the... (1 Reply)
Discussion started by: h0ujun
1 Replies
5. Shell Programming and Scripting
Hi Everyone,
I am looking for a command that would do the following:
1) Change all the letters/words in a file to Lower case Letters/words.
2) Remove the Underscore (_) and Change the Character after the underscore (_) to an Uppercase letter.
Example:
File contains the below words:
... (5 Replies)
Discussion started by: filter
5 Replies
6. Programming
Hello,
I have a text file (FILE.txt) that contains the following information:
userAxxx.name@email.com userA
userBxxx.name@email.com userB
userxxCx.name@email.com userC
and more....
in scripting, I can easily do a grep and awk to store an email info into a string... (6 Replies)
Discussion started by: tqlam
6 Replies
7. Shell Programming and Scripting
Hi
I am programing a expect script on debian, I connected to a firewall to get configuration copy via telnet or ssh but Because of firewall show configuration console wait and print --More-- need press space key at least 100.Help me please.
firewall output like this :(
This output isn't... (3 Replies)
Discussion started by: ayucelen
3 Replies
8. Shell Programming and Scripting
having trouble with this seemingly simple taks.. :mad:
Test data:
we want to keep lines 2,3 & 4
-- want to exclude when ${.*schema} is preceded with an underscore; Valid {.*schema} should always be preceded spaces or be found at the beginning of a line.
egrep... (5 Replies)
Discussion started by: danmauer
5 Replies
9. UNIX for Advanced & Expert Users
hi
i am writing an expect script to automate su command, my script goes like this...
#!/usr/local/bin/expect --
set password
set env_var
spawn su UNAME
expect "password:"
send "$password\r"
expect "env"
send "setenv PATHVAR $env_ver\r"
expect "env"
send "echo \$PATHVAR"
expect eof ... (2 Replies)
Discussion started by: sudheer157
2 Replies
10. UNIX for Dummies Questions & Answers
can you help please.
variable 1 = TODAY=`date +"%Y%m%d"`
i.e. echo $TODAY
20080407
DB=GERMANY
echo $DB
GERMANY
echo $DB.$TODAY
GERMANY.20080407
echo $DB.$TODAY_1.dmp
GERMANY..dmp (3 Replies)
Discussion started by: pinkie
3 Replies