16.09.2017

(bash): The most useless commands (11)

After talking about
  1. rev
  2. yes
  3. sl
  4. cowsay
  5. cmatrix
  6. cal
  7. rig 
  8. pi
  9. figlet
here a packages called filters which comes with such commands:

$ echo hello my friend | jethro
hello mah friend
$ echo hello my friend | chef
hellu my freeund
$ echo hello my friend | kraut
hello mein friend
Manpage:
DESCRIPTION
       All  of  these  programs are filters to do all sorts of strange things to text.  No personal, racial,
       religious or societal slurs are intended. For amusement only.

       All the filters read input from stdin, change it, and write the filtered text to stdout. Some filters
       also support reading from files and writing to stdout.

       b1ff   The B1FF filter

       lolcat As seen in internet gifs everywhere.

       cockney
              Cockney English

       chef   convert English on stdin to Mock Swedish on stdout

       eleet  K3wl hacker slang

       fanboy Speak  like  a  fanboy.  Filters  out  extraneous  words and focuses on the words fans use. By default, it will speak like a fan of git/Linus/linux development.  To  change  this,  pass  as parameters  the  words that the fanboy typically uses. Alternatively, pass the name of a topic that typically has fanboys to use a predefined word list.

       fudd   Elmer Fudd

       jethro Hillbilly text filter

       jive   Jive English

       jibberish
              Runs text through a random selection of the rest of the filters, to make really weird output.

       ken    English into Cockney, featuring (dubious) rhyming slang for a lot of computer terminology.

       kraut  Generates text with a bad German accent.

       kenny  Generates text as spoken by Kenny on South Park.

       ky00te This program places a very cute (and familiar to FurryMuck fans) accent on any text file.

       nethackify
              Wiped out text like can be found in nethack.

       newspeak
              A-la-1984

       censor CDA-ize text

       nyc    Brooklyn English

       pirate Talk like a pirate.

       rasterman
              Makes text look like it came from the keyboard of Carsten Haitzler.
      scottish
              Fake scottish (dwarven) accent filter, inspired by the character "Durkon" from  Order  of  the
              Stick.

       spammer
              Turns honest text into something that is liable to be flagged as spam.

       scramble
              Scramble  the  "inner"  letters  of each word in the input into a random order.  The resulting
              text is still strangely readable.

       studly Studly caps.

       uniencode
              Use glorious unicode to the fullest possible extent. As seen previously in many man pages.

       upside-down
              Flips text upside down. Stand on your head and squint to read the output.

08.09.2017

WLAN management with linux: networkmanager CLI "nmcli"

Configuring WLAN settings with the graphical user interface network manager is really easy.
Nevertheless sometimes it is necessary to configure the WLAN settings via a terminal. And therefore you should use nmcli:

To get a list of all available networks use "nmcli d wifi list"
$ nmcli d wifi list
*  SSID                 MODUS  CHAN  RATE       SIGNAL  BARS  SICHERHEIT
*  Gastzugang           Infra  12    54 Mbit/s  72      ▂▄▆_  WPA2      
   Napoleon Gastzugang  Infra  36    54 Mbit/s  27      ▂___  WPA1 WPA2 
   Napoleon Gastzugang  Infra  1     54 Mbit/s  25      ▂___  WPA1 WPA2 
   Napoleon             Infra  1     54 Mbit/s  25      ▂___  WPA2      
   Napoleon             Infra  36    54 Mbit/s  25      ▂___  WPA2      
   WLAN-901974          Infra  6     54 Mbit/s  24      ▂___  WPA2      
   Z                    Infra  11    54 Mbit/s  22      ▂___  WPA2      
   me5gast              Infra  3     54 Mbit/s  19      ▂___  WPA2      
You can get all saved connection via "nmcli c"
$ nmcli c
NAME                       UUID                                  TYP              GERÄT 
Gastzugang                 41d0717a-c4bc-47a4-acf7-bfa66dfa5462  802-11-wireless  wlp3s0
Kabelnetzwerkverbindung 1  316621ce-f61c-3163-a655-826306a79690  802-3-ethernet   --     
To connect to a wlan network "nmcli d wifi connect password
# nmcli d wifi connect Gastzugang password mypassword
Fehler: Aktivierung der Verbindung ist gescheitert: (7) Geheimdaten waren erforderlich, wurden aber nicht angegeben.
or with the right credentials:
Gerät »wlp3s0« wurde erfolgreich mit »754b6e6a-6284-4cf3-9737-13dd66f85b8e« aktiviert.


02.09.2017

Bash: enabling Eclipse for Bash Programming | Plugin basheclipse (debugging) part 2

If you want to debug bash scripts inside eclipse you have to do 2 things:
BUT:
As i wrote in the last posting, toggling breakpoints was neither possible in Eclipse Neon  nor Eclipse Juno.

First you have to install JDK 1.6 and Eclipse Luna to be able to set breakpoints. (see EDIT at the end of the posting: Neon works as well...)




After you have to set up

  • Eclipse Luna with JDK 1.6
  • installad shelled & basheclipse
    (and follow the steps from posting shelled and posting basheclipse)
you have to create a Shell Script project within a shell Shell Script file:

via ->new->other


and again ->new->other


After that put some content into your shell.sh file:
(as written in the basheclipse posting, you have to add _DEBUG.sh into your project directory where shell.sh resides and add this line at the beginning of your shell.sh:
. _DEBUG.sh
Then change to the debug perspective and start a debugging session:
->run->debug

Then you will get the following:

Hmmm...
?
It says, it is running and not waiting at the first breakpoint...
What is wrong here?

Just keep calm. You have to start your shell.sh:
bash ./shell.sh

And here we go:


As you can see, the variable "a" is show with its value "test" and you can walk through your script breakpoint by breakpoint....

I asked the developer at sourceforge, why it does not work with Eclipse Neon. I hope i will get an answer... (or better a fix ;-)

EDIT: After some retries: switching from OpenJDK to Oracle's JDK did the job. (The installation of basheclipse has to be done with Oracle's JDK. After that i was able to run it on Eclipse Neon even with OpenJDK).