Opened 4 years 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: Nathaniel Madura
Priority: normal Component: ShellExampleMacro
Severity: normal Keywords:
Cc: Trac Release:


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

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)

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain Nathaniel Madura.

Add Comment

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

Note: See TracTickets for help on using tickets.