Sponsored Content
Top Forums Shell Programming and Scripting Blog-Thread: Creating a Shell Wrapper and Runtime Modifier (SWARM) Post 303045902 by sea on Friday 17th of April 2020 02:58:13 PM
Old 04-17-2020
Thank you Drl!

MIG, Yes...
I didnt post this output before - because I was too upset to, therefor you could not have known, sorry for that.

Code:
[~/prjs/SWARM] 0 $ time ./runtime 
.........SWARM 0.4-18
 
  | 2020-04-17 / 18:37:38\033[0m


\033[7mWelcome to a short introduction\033[0m


SWARM is not supposed to be called directly like this.



Instead it is to be sourced by your script to get access to it's functions.




\033[7m\033[0m


When calling SWARM like you just did, you should provide arguments.



They are:



./runtime config

To configure SWARM, either as user or as root

./runtime help

Lets you browse through all provided functions.

./runtime tarball

Dev-Tool to repack SWARM to /home/sea/swarm-18.tar.gz





/home/sea/prjs/SWARM/data/libs/util.enduser: Zeile 417: [: : Ganzzahliger Ausdruck erwartet.




/home/sea/prjs/SWARM/data/libs/util.enduser: Zeile 417: [: : Ganzzahliger Ausdruck erwartet.
0) Back



/home/sea/prjs/SWARM/data/libs/util.enduser: Zeile 417: [: : Ganzzahliger Ausdruck erwartet.
1) one



/home/sea/prjs/SWARM/data/libs/util.enduser: Zeile 417: [: : Ganzzahliger Ausdruck erwartet.
2) two



/home/sea/prjs/SWARM/data/libs/util.enduser: Zeile 417: [: : Ganzzahliger Ausdruck erwartet.
3) three



/home/sea/prjs/SWARM/data/libs/util.enduser: Zeile 417: [: : Ganzzahliger Ausdruck erwartet.
4) four



/home/sea/prjs/SWARM/data/libs/util.enduser: Zeile 417: [: : Ganzzahliger Ausdruck erwartet.
5) five



6) six



 > '^\[\['++ [[ -z ' ]]

And that line 417 (if [ "$sum" -lt "$COLUMNS" ]) is of the printlist function.
Neither pick nor printlist are required to use printe, title and/or header -> yet that's been the only thing (pick) I was working on that day....
To where your set -x reference goes to.

But even with that error... the output is correct (at least the number-value thing).
Just 1 or 2 posts before the visual interface was working - but pick wasnt..
Now, none of the visual-output works.

It's exactly these kind of ('repeating') errors that are annoying and specialy frustrating when you had thought (and believed) you made it more robust....
Just to figure that it only worked within a bubble...

It was similar with TUI...
But there, it was the installation process.... which worked fine on all my machines when I had git-push'd it.
Just to then be non-working when I did try to install it a week later...
Over and over and over again....

My only mental-sanctuary on this topic is, that this time it is runtime only, so I wont need to use an 'installing' method per basic requirement.
Meanwhile, to my understanding/'feeling', this also makes it more 'vulnerable'...

I guess I wanted too much, too fast.
Yet, as soon the 'theme' is working again, I know everything will look nice again.

Thought, big part of my frustration comes from the memory of those 5 years working on this as TUI.
What I've achieved within the past ~2 months is not that bad.
Sure, there are still missing some parts, but as a whole, the CORE is (at least I thought so) working, and I do have alot of the nice-to-have functions ready.
And with 1 or 2 exceptions, those that are missing are done quite easily

Lets be 'honest', asRoot and pick are alot easier than a multiple-background-job-manager and a file-and-dir-browsing function that may use 'select' or 'read' and execute passed arguments to match dirs and files and arguments left to pass to the passed file, while reading and showing 'reserved keyword files' (the actual key-feature of SWARM -> the function swarm, which I havent even started yet to rework, because it relies on all other functions to be working stable.

Though, I might 'reserve' the background-job-manager for script-tools....

Also, I dont even know if other people are actualy interested in.
With TUI, I had ALOT of initial excitement at hand to compensate 'against' that uncertainty and keep motivation up.

Now I had started again, mostly because I still want 'it' working.
*nix to me, is scripting.
And scripting is what I love since my first i386 after I got aware of batchfiles and qbasic on MSDOS 5.
However, knowing that other people actualy would be interested to use it -> you know, making it more than just an ego-self-use-project <- would help to keep motivation up.

Or even better, would want to help me with the ACTUAL project I want to do -> Script-Tools.
SWARM is "just" a a 'side-product' of that project - so it (script-tools) can be realized as I imaged it.

Geez... it all started so simple and easy.
But the longer I 'worked' with *nix, the more complex my own 'demands and requirements' became.

On the other hand....
If I would be told by some people that this actualy IS a challenging task,
even for people with several years of coding and scripting experience, I would feel ALOT better about too.

I mean, I like to tell myself that it is.
As I'm not aware of other theme-able, multi-language supporting scripted project that support TTY and GUI support and have a 3-way interface between enduser, OS/machine and script-author -> then again, when properly done, 'one' (me) would not reckognize the difference (to compiled binary).
But as long nobody else says so, it feels like a self-induced-made-up-image.
This User Gave Thanks to sea For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

korn shell version at runtime?

How can I check what kornshell version I am using at runtime from within a kornshell script? (3 Replies)
Discussion started by: qanda
3 Replies

2. Shell Programming and Scripting

crontab is not creating runtime files which are in script..

this is the output i am getting here.. cp: cannot create /wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/eoigwsA_Health_Status_Report.html: Permission denied /wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/ /wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/GenerateReport.sh:... (6 Replies)
Discussion started by: surekha268
6 Replies

3. Shell Programming and Scripting

Korn Shell Wrapper script

Hi Guys, I am trying write a wrapper script but I don't have any idea. I have 4 different korn shell scripts and all of them needs some parameters from command line (positional parameter). My script cant be interactive because its supposed to be automated. I am confused how can I write a wrapper... (6 Replies)
Discussion started by: pareshan
6 Replies

4. Web Development

Creating a blog site on a local computer

Hello! I would like to create a blog website on a web domain of mine. The blog will be used for publishing economics-lated articles. I tried to use a few open source packages for blog creation (WorldPress, b2evolution, Movable type) which I wanted to test on a local computer before arranging... (5 Replies)
Discussion started by: degoor
5 Replies

5. Programming

creating multiple threads using single thread id

Hi all, Can I create multiple threads using single thread_id like pthread_t thread_id; pthread_create(&thread_id, NULL, &print_xs, NULL); pthread_create(&thread_id, NULL, &print_ys, NULL); pthread_create(&thread_id, NULL, &print_zs, NULL); pthread_join(thread_id, NULL); what... (2 Replies)
Discussion started by: zing_foru
2 Replies

6. Shell Programming and Scripting

Shell Runtime Statistics

Hi, I am trying to capture runtime stats of a shell script (c shell). Are there system variables to call? Or should I create a date variable at the start of the script and at the end of the script? I am trying to capture the time if the script stops or ends with error. Please help. ... (4 Replies)
Discussion started by: CKT_newbie88
4 Replies

7. Shell Programming and Scripting

Wrapper Script in Perl Or shell

Hello, My requirement is based on Oracle where we run a perl script and it asked some questions.I want to write a wrapper which will answer all these questions. How is it possible. Thanks (16 Replies)
Discussion started by: cotton
16 Replies

8. Homework & Coursework Questions

Shell Script average runtime

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Make a bash script that calculates average runtime for the first two scripts you made. The average should be... (17 Replies)
Discussion started by: navlelo
17 Replies

9. Shell Programming and Scripting

Shell Script and Progress Bar or GUI Wrapper

Hi, I have shell script that I am running under Ubuntu as root. Is it possible to hide the command window and show the user some sort of progress /random progress bar / or other form of GUI interaction? On MAC, I have been using Platypus but on Ubuntu I am not sure what to do. (4 Replies)
Discussion started by: naveedanwar4u
4 Replies
All times are GMT -4. The time now is 07:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy