Sponsored Content
Top Forums Shell Programming and Scripting Feedback wanted for upcoming script language Post 303043262 by sea on Wednesday 22nd of January 2020 06:41:40 PM
Old 01-22-2020
Feedback wanted for upcoming script language

Hi

I'm currently rewriting a project from install-required to a pure runtime form.
The former had required the project name and the definition of the command as name, as they all become functions now, this could be shorter.

As you might have figured, the project already exists in another form - the first iteration I had done.
With the new change to make it pure runtime - it was not slow before, but - it will be alot faster.
And as before, cross-platform, arch independant, working at runlevel 1 or higher.

Simplified use of select, yesno (read), themes, or starting of relevant GUI or CLI commands (editor, webbrowser) where available/required.
No worries wether curl or wget is installed by the use of 'download', and lots, lots more!

Question (Poll):
When you write a script, what would you prefer to be a command?
* a 6 -7 letter 'word'
* a 2 letter 'word' of which 1 is capital?

Be aware, this would replace your current 'echo' or 'printf' commands that are supposed to be seen by the end user.
(I trust your intellect to extrapolate the approriate values at the poll)

This only refers to the 2-4 absolute core display functions.
In a simplified prespective, I use:
* echo : for final outputs - starting on a new line afterwards
* printf : for ongoing changes
* I'd like to have a 'header' for a project
* and a 'title' for different section or topics

Mostly because I do not want to 'reuse' echo, allthough SWARM is a Shell Wrapper...
Or should I?
It would be easier, but could you differ print and echo for end user output vs. $PRINTF and $ECHO for internal use (though, the latter is required anyway)?
This is something I cant decide 'for myself' when I want others to 'get along' with it. (the game of numbers)


Summarization:
A 2 letter 'word' would require only 3 keystrokes, while a 6-7 letter 'word' would not require shift.


Addon question (Comment):
Would you prefer the commands 'title' and 'header' to have as such, or be adapted to the result of the poll?

See screenshot - This is how SWARM can look like (note: select is now handled too and root has a different theme):
'Topline' = header
'2nd' line = title
'3rd' line + = 'echo' or 'printf' replacements

Image

Last edited by sea; 01-22-2020 at 09:58 PM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Feedback on Script.

Hi all, Would like to get some feedback on a scrip that I've finished writing at home for work. Any constructive feedback from operations used to legibility, etc. would be appreciated - anything at all. It's my first real script that will be running on a clients server. The script is... (2 Replies)
Discussion started by: Cameron
2 Replies

2. UNIX for Dummies Questions & Answers

New User needing Help for upcoming job

Hello All, I'm applying for a new job in telecommunications and have been asked to learn unix and pearl scripting. I've got a copy of knoppix Linux 03. I at this point only know how to list files, create directories, change permissions. I was instructed to learn how to create files, basic... (3 Replies)
Discussion started by: cyberjax21
3 Replies

3. Shell Programming and Scripting

I wanted to update a script, more dynamic (just say no to hard coding)...

currently it has the following: bdumpN=`ll /home/apps/oracle/admin/DBprod/bdump/DBprod_j* | grep "$Cdate" | wc -l` If I pass the DBname, I would not have to hardcode it in the script... I can capture the database name by adding the following: DBname=$1 The problem is, I have been unable... (2 Replies)
Discussion started by: mr_manny
2 Replies

4. Shell Programming and Scripting

help wanted to understand MQ script

hi , i am writing a script to copy the MQ messages from onw queue to another. The following i got from one site, but i di not understand , can anyone explain. /root/scripts/sap/q -m$Q_MANAGER -i$Q_NAME_SRC_1 -F/logs/mq/MQ_COPYdump_$Q_NAME_SRC_1.$$ /root/scripts/sap/q -m$Q_MANAGER... (0 Replies)
Discussion started by: Satyak
0 Replies

5. Shell Programming and Scripting

lvm/tar/rsync backup script feedback/criticism

I have written a shell script to perform backups using tar, rsync and optionally utilise lvm snapshots. The script is not finished but is in a working state and comments/descriptions are poor. I would greatly appreciate any criticism and suggestions of the script to help improve my own learning... (0 Replies)
Discussion started by: jelloir
0 Replies

6. Shell Programming and Scripting

First public beta of upcoming gawk 4.0 release

Hi (g)awk lovers, just spreading the news: the first beta is available and there are many new features. This is the original announce. (3 Replies)
Discussion started by: radoulov
3 Replies

7. Shell Programming and Scripting

I just wanted to share this bash script for linux

If your Unix box doesn't support bash scripts then do not do the following. Create a file named version. type chmod 755 version and then copy and paste the code below into the file. Then type "mv version /bin" and presto, type version. A cool full hearty command. If you know more about you're Os... (3 Replies)
Discussion started by: Errigour
3 Replies

8. What is on Your Mind?

Wanted: Feedback on TUI

Hello Couldnt think of a better place than "What is on your Mind". So me have that project https://www.unix.com/shell-programming-and-scripting/253496-tui-text-user-interface-framework-scripts.html. :b: Eventhough i tried to describe it well in its thread and its README.md on github, i've... (15 Replies)
Discussion started by: sea
15 Replies

9. What is on Your Mind?

Wanted: Feedback on TUI (2)

Hello everyone It just so happend that TUI was rejected from GNU for the moment, with one of the reasons beeing that additional user feedback was required. So, if you like scripting, bash in specific, please have a try and report your feedback, to help me find all issues to fix, and as i... (0 Replies)
Discussion started by: sea
0 Replies
PO4A-RUNTIME.7(7)					User Contributed Perl Documentation					 PO4A-RUNTIME.7(7)

NAME
po4a-runtime - po4a and runtime gettext translation without Autotools Introduction With po4a-build, po4a also includes support for adding translation of runtime script output messages using gettext but without requiring the package to adopt Autotools and the typical ./configure process. Using example Makefile snippets, packages can harness intltool with minimal effort. Layout Documentation translation should NOT use the same po/ directory as the runtime translation. Whilst runtime translation can use directories other than po/, it is usually easiest to go with the convention. Multiple languages Just a word on packages that use scripts in multiple programming languages. A common mix is Perl and shell. Note bene: gettext WILL get confused and omit strings from one or other language unless file extensions are used for whichever is the least problematic language. When using multiple languages, experiment with various settings in po/Makevars until you get all the strings you need in the POT file. In particular, specifying two languages in po/Makevars can be problematic. Instead of: # Don't do this: XGETTEXT_OPTIONS = -L Perl -L Shell --from-code=iso-8859-1 Consider renaming (or providing symlink(s) for) all files for one of the languages involved and omitting the explicit -L options. The file extension only needs to exist during the time that po/POTFILES.in is being processed. The --keywords option can also be useful - see the xgettext documentation. Populating po/ So, create your top level po/ directory and then use the example files in /usr/share/doc/po4a/examples/ to populate it. LINGUAS Must exist, even if empty. Consists of a list of translations - each line not starting with a '#' must match an existing PO file. e.g. if LINGUAS contains a single line, 'fr', an fr.po file must exist alongside the LINGUAS file. $ cat po/LINGUAS cs de fr $ By convention, the LINGUAS file is sorted alphabetically but that is a manual process. POTFILES.in The list of files containing the messages that need to be translated at runtime - i.e. your scripts. If you've used the top level po/ directory, the paths should be relative to the top level directory, not the po/ directory itself. $ ls -l myscript.pl another.pl foo/support.pl po/ po/POTFILES.in $ cat po/POTFILES.in myscript.pl another.pl foo/support.pl $ Note that it is explicitly supported that the scripts themselves can contain strings for both runtime and documentation translation, e.g. using gettext functions for runtime and embedded POD content for documentation. So it is not a problem to have the same file listed in po/POTFILES.in and doc/po4a-build.conf Makevars-perl.example If your scripts are in Perl, copy this example file as po/Makevars and edit it to suit. Makevars-shell.example If your scripts are in shell, copy this example file as po/Makevars and edit it to suit. po4a-build.make Copy this example file as po/Makefile - it shouldn't need editing but you may want to keep it updated against /usr/share/doc/po4a/examples/po4a-build.make as it may need to be updated within po4a releases as the underlying intltool support changes. (The file itself was generated from another project using Autotools and intltool.) Building These snippets need to be added to your top level Makefile or whatever other method you use to prepare your sources for distribution. clean: $(MAKE) -C po/ clean install: $(MAKE) -C po/ install DESTDIR=$(DESTDIR) dist: $(MAKE) -C po/ pot (In an Autotools project, this would happen automatically by simply adding po to the "SUBDIRS" value in Makefile.am.) Maintenance Runtime translation isn't quite as easy as po4a-build in that adding a new translation does require editing po/LINGUAS, but apart from that, updating translations is merely a case of replacing the relevant PO file with the new version. Depending on how you prepare your source tarball, you may also need to list new PO files in the MANIFEST file or add to the script(s) that prepare the tarball. (That also applies to po4a-build.) Any *.mo or *.gmo files in po/ can be deleted / cleaned up. Copyright Whilst the example files are part of the po4a project, you are free to use, modify and distribute them in your own projects without needing to refer back to po4a or list the po4a team in your own copyright notices, in the same manner as other build tools like Automake itself. If you want to mention po4a, that is fine too. AUTHORS
Neil Williams <linux@codehelp.co.uk> perl v5.14.2 2012-05-17 PO4A-RUNTIME.7(7)
All times are GMT -4. The time now is 06:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy