Variable arangement to display


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Variable arangement to display
# 1  
Old 10-13-2013
Variable arangement to display

Hello

For this future package for community, i'd like to know your preference on this presented 'issue'.

Writing some commands which will display some strings, using another command supporting 3 strings to be supplied, i wonder how the 'default output' should look like.

Let me use a picture to illustrate:
Image

Refering to the "download"-lines..
Code:
# | Downloading...               pcbsd9.2_handbook_en_ver9.2.pdf (5.6M)                [  /   ] | #

Actualy is:
tui-printf "Downloading..." "$THIS ($tmp_size)" "[ $(tui-indi) ]" inside the command tui-status, which reports a visual interpreter for the return level of previous executed command.


Maybe too much details...
And i wonder if that either should be applied to the others as well, so:
Code:
# | Downloaded: /home/simon/net/dls/demo-4186/pcbsd9.2_handbook_en_ver9.2.pdf          [  ✔   ] | #

Which currently is:
tui-status $? "Downloaded: $(pwd)/$THIS"
would become:
tui-status $? "Downloaded:" "$(pwd)/$THIS"
Which would result/look like:
Code:
# | Downloaded:              /home/simon/pcbsd9.2_handbook_en_ver9.2.pdf               [  ✔   ] | #



So straighly asked:
1)
Code:
# | Downloaded:              /home/simon/pcbsd9.2_handbook_en_ver9.2.pdf               [  ✔   ] | #

2)
Code:
# | Downloaded: /home/simon/pcbsd9.2_handbook_en_ver9.2.pdf                            [  ✔   ] | #

Just imagine you'd be using it...
As default information output presented to you, which would you prefer?

Thank you

EDIT PS:
Oh, and if you would prefer 2 for the default output, would you like to have the 'processing information' aligend in the center (as in the screenshot) or lefthand side too?
Full script can be seen if you follow the image's link.

Last edited by sea; 10-13-2013 at 10:42 AM..
# 2  
Old 10-14-2013
I think the specific format of a message is not as important to system administrator types. A key switch for an adminstrator is a verbose option where you can turn of extraneous information and check the status code. I generally don't want a command to tell me anything if all goes well.
# 3  
Old 10-15-2013
Thank you, even as you didnt answer my question, it show's that i didnt properly "sell" it to the people yet...
Or its such a niche, that almost noone actualy could use.

I'm off the job for ~5 years now, but when i had started like 17 years ago (not Unix/Linux though), 'we' used to write scripts, wether those were batch or vbs, for either departement leaders or other 'special workforces'.

-- "Selling / Advertise" -- of its Purpose.
So its not ment for Admins to use for themself, as they dont need it. (as you stated)
Its ment for Admins/{Power,Super}Users writing scripts for 'Users' (wether they be CEO's, janitor, chef, office clark...) - as those usualy dont get along with the terminal.

Example:
Its ment for YOU, writing a script for your wife/husband who's not so skilled with *nix siystems - but you cant/dont want to write a full GTK application as a script does the job just fine.
All you'd need is a little presentation so (s)he doesnt run away just because its a 'shell-app'.

That is when TUI (could be) is used - and the scenario for the question of 'alignment' in the first place.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Display all lines after a matching variable

Hi, I have a file called abc.txt with the following dates 2016-01-27 2016-01-28 2016-01-29 2016-01-30 2016-01-31 2016-02-01 2016-02-02 2016-02-03 I would like to print all lines below if 2016-01-31 is found, excluding that date. I use this command --> sed '1,/2016-01-31/d' abc.txt If... (4 Replies)
Discussion started by: Nagesh_1985
4 Replies

2. UNIX for Dummies Questions & Answers

DISPLAY Environment Variable

I've seen articles which say "export DISPLAY=<IP>:0" and others which say "export DISPLAY=<IP>:0.0". Can someone explain what the difference is? TIA (4 Replies)
Discussion started by: cjhancock
4 Replies

3. Shell Programming and Scripting

Trying to display a tab character in variable

Hi, I'm trying to figure out a way to encapsulate a tab character, or four or five space characters into a string variable to be used in my script. I'm using the bash shell. I tried $variablename=" <string text>" but it didnt give me the output i wanted (output was still... (7 Replies)
Discussion started by: rowlf
7 Replies

4. Ubuntu

Configure DISPLAY variable for DB2

I am trying to install a DB2 90-day trail but I got the error with the DISPLAY, it says is not configured correctly. I cannot post the error due to I am not in my personal PC but when I type: echo $DISPLAY it shows nothing. I also tried: xclock & and nothing appears just an error. I know there... (2 Replies)
Discussion started by: agasamapetilon
2 Replies

5. UNIX for Dummies Questions & Answers

How to export the Display variable

I'm trying to open an xwindow on my Sun server. What am I doing wrong? # echo $SHELL /sbin/sh # # export DISPLAY=localhost:0.0 DISPLAY=localhost:0.0: is not an identifier Thank you! (1 Reply)
Discussion started by: FredSmith
1 Replies

6. Shell Programming and Scripting

How to read variable with no display

I'll be reading user name and password from the person while running a shell script so that he is authenticated. The challenge here is to read the password variable without displaying on screen. Is there a way? I presently do it displaying it on the screen as echo " please enter your... (9 Replies)
Discussion started by: dayanandra
9 Replies

7. Shell Programming and Scripting

Loop counter variable display

Hello everyone, how can I send output to the screen from a running script or tcl, in such a way that if a loop is executing I will see the rolling counter on my screen as the records are processed in the loop. I do not want the screen to scroll, though. In other words can a var's value be painted... (2 Replies)
Discussion started by: lifespan
2 Replies

8. UNIX for Dummies Questions & Answers

Display from a variable using echo.

I have a variable that is outputting a lot of space. here has been 45 lines returned ... how can I remove the spaces between the "been and the 45" CODE: fil_len=`wc -l < coshb.txt` if ; then cat coshb.txt | more echo " " echo "There has been ${fil_len} lines... (4 Replies)
Discussion started by: jagannatha
4 Replies

9. Cybersecurity

Display variable

Hi: Im trying to change the display setting from my Linux server to Linux workstation but a Refused connection by server appear. The first task that I doing is to export the DISPLAY variable on my Linux Workstation so I tried to execute several X programs with the Refused Connection message.... (2 Replies)
Discussion started by: dansanmex
2 Replies

10. UNIX for Dummies Questions & Answers

Passing DISPLAY variable through rsh

I am trying to add a menu item (Openwin menu) to do an rsh and execute a script which open a graphical tool. The problem I am having is that I cannot seem to pass the display variable. The OS for both boxes is Solaris 2.6. Thanks, Chuck (4 Replies)
Discussion started by: 98_1LE
4 Replies
Login or Register to Ask a Question