Modify

Opened 12 months ago

#11322 new enhancement

Add support for program stdin reads, by allowing $$ in the middle of a line and format first part as output and second part as user input.

Reported by: anonymous Owned by: nmadura
Priority: normal Component: ShellExampleMacro
Severity: normal Keywords:
Cc: Trac Release:

Description

Sometimes you run a program or command, which prompts for some information in an interactive way.

Currently, you can only add two dollar signs ($$) at the start, which causes the full line to be put in prompt format. By allowing to add $$ in the middle of the line, you make such stdin reads possible.

For example:

$ copy tftp file
(user is asked for an ip, so part of line is output, part of line is input!!)
TFTP server IP address:$$ {tftp_ip}
Choose file type:
1. config: 2. opcode: <1-2>:$$ 2
Source file name:$$ smcFirmware/latest.bix
Destination file name:$$ latest.bix
Processing...
Success!

The first part of the interactive lines should be formatted as output. The last part of the interactive lines should be formatted as user input. The {tftp_ip} would also be parsed as a variable in the user input.

Attachments (0)

Change History (0)

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.