07 May 2021, 16:34 | #1 |
Registered User
Join Date: Sep 2019
Location: Corfu / Greece
Posts: 410
|
Presenting shell output in nice requester
[http://www]
Nikos Pagonis Posts 81 07 May 2021 13:28 Hi there I was wondering how i can present the output of a command in a nice requester like the one coffin and you can see in the attached photo. That menu uses the RequestChoice command which then outputs its data to ReqAttack and produce that result. That technique is fine for small text outputs like the core info for example. When i use the same command for something that produces a lot more Info like the attached shell photo then i get the same nice requester but in a huge long form, from one side of the screen to the other and the info all in a straight line instead of one line below the other. Of course not all info is in there cause there is not enough space. Any idea how i can achieve a nice presentation of the shell output? Thanks Last edited by npagonis73; 07 May 2021 at 16:56. |
07 May 2021, 17:40 | #2 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,303
|
You need to add newline markers in the body text. E.g.: "Board information:*n*nProdukt-ID : 6*n..."
|
07 May 2021, 20:53 | #3 |
Registered User
Join Date: Sep 2019
Location: Corfu / Greece
Posts: 410
|
Hello Daxb!!!! Always available to help. Appreciate it mate. The thing is that all this information you see in the shell comes out with the following command "VControl Board" . I don't input all this by hand. The way you describe is correct and I have made a script inputting all this data by hand using the *n to separate every line. The alignment is never ok though but never mind. The point is that it is not automatic anymore and you can not use it to identify any vampire board.
|
07 May 2021, 22:01 | #4 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
|
Maybe you could pass the output through a script/tool (like 'sed') to replace '\n' with '*n'
|
07 May 2021, 22:04 | #5 |
Registered User
Join Date: Sep 2019
Location: Corfu / Greece
Posts: 410
|
|
07 May 2021, 23:01 | #6 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
|
I was just suggesting sed to indicate a type of tool which may be of help - sed is typically found on unix/linux systems. It's probably also available for amiga.
something like "sed -z 's/\n/*n/g'" will convert newline (\n) with *n. Edit: Actually there is a very small version of sed on aminet by Thomas Richter, but I don't know if it supports -z, otherwise gnu versions are also available, but they are orders of magnitude larger. Last edited by hooverphonique; 07 May 2021 at 23:30. |
07 May 2021, 23:41 | #7 | |
Registered User
Join Date: Sep 2019
Location: Corfu / Greece
Posts: 410
|
Quote:
Take care |
|
09 May 2021, 10:12 | #8 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,214
|
No, SED doesn't support that. It only operates on entire lines. You can attach a *n to each end of line, however.
But there are other tricks. The shell knows how to escape newlines itself in variable expansions. That is, you could place the result in a variable and enclose the variable name in double quotes. This will perform the necessary escaping of the variable content by stars. |
09 May 2021, 19:45 | #9 | |
Registered User
Join Date: Sep 2019
Location: Corfu / Greece
Posts: 410
|
Quote:
Thanks again for your help Nikos |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Clear background color for Shell window- Shell-StartUp | fc.studio | support.Apps | 13 | 25 March 2022 18:52 |
help with Amiga Shell - quiting shell windows properly | lost_lemming | support.Apps | 2 | 03 January 2021 19:37 |
Use file requester to specify path in Shell? | Foebane | support.Apps | 5 | 01 January 2017 15:32 |
Shell output to log file | Bloodwych | support.Apps | 3 | 22 December 2009 14:03 |
Presenting!!.... *drum roll* | Dastardly | Amiga websites reviews | 14 | 22 March 2004 23:06 |
|
|