Đã Đóng

Save output to file from Expect Script - fix code problem

BASH SCRIPTING, EXPECT SCRIPT

should be easy for smart guy/gal

The output of my remote command is approx 114 lines..

When I attempt to write the expect buffer to a file it only saves about 48 lines.

Basically, i find the value I want from the output of the command, then I try to write the output to a file.. and drop out of my loop. I have done some digging and its a problem that can be overcome but Im not smart enought to figure it out or dont have days to do it.

--

set values $expect_out(buffer)

set found [regexp {SR_ID} $values match fnd]

if {$found == 1} {

set i 1

while {$i < 51} {

set output [open "[url removed, login to view]" "a+"]

set outcome $expect_out(buffer)

puts $output $outcome

incr i

}

close $output

Kỹ năng: Linux, Quản trị hệ thống

Xem thêm: expect output file, regexp linux, match problem, linux regexp, file expect, expect file, bash file, linux bash script, bash script, loop script linux, write linux script, script smart, shell script find string file save, fix match, write linux command, easy find script, linux bash script loop, save remote file, linux remote admin script, loop command linux, linux loop, linux smart, linux command loop, open save, script bash

Về Bên Thuê:
( 38 nhận xét ) United States

Mã Dự Án: #6368606

4 freelancer đang chào giá trung bình $29 cho công việc này

cracken

If you have a chance, please accept me to take good care of this task and you can verify the quality of my output. By the way, let me introduce myself. I work at Lexmark Research and Development Corp. I developed too Thêm

$30 USD trong 1 ngày
(0 Đánh Giá)
0.0
iddoalex

Hi, I've been writing BASH and TCSH scripts for 2 years so far, Highly professional. Your project is just right for my skills and knowledge. Would be happy to help!

$29 USD trong 1 ngày
(0 Đánh Giá)
0.0
kekeadou

一个有效的提议尚未被提供

$30 USD trong 3 ngày
(0 Đánh Giá)
0.0
ilyxaxxx

Hello, i ready help you with script. My expirience writing script is very good (BASH, EXPECT). I m very glad work with you/

$25 USD trong 1 ngày
(0 Đánh Giá)
0.0