Standalone and useful Shell Scripts for Linux

Overview

This repository contains various Ma_Sys.ma shell scripts used with MDVL. They are indented to be runnable independently of each other.

Non-MDVL-users may find it interesting to use and adapt the individual script files rather than installing all of them.

The following scripts are available:

boxes Display boxes of text characters in the terminal.
deltamount Create a bind-mountpoint where changes go to a separate directory.
find_double_windows_filenames Detect names which only differ wrt. uppercase/lowercase.
gimp_convert_to_indexed Batch-convert .tga files to indexed .png files.
ma_cryptvol Mount and umount encrypted volumes.
ma_rename_normalize Recursively rename files.
ma_scrmir Invoke xrandr to mirror screen to beamer.
ma_vnc_over_ssh Connect to remote system by VNC tunnelled through ssh.
rmbc Detect Windows-copies of files and move them to subdirectories.
scrapbook_overview Generate XHTML overview pages for directories with websites.
virshmigtui Interactively migrate VMs between hosts.

Boxes

Synopsis

boxes

Description

ASCII and Unicode art at its finest. This script displays boxes made of various characters. This may inspire the user to decide for/against using any of them in own shell scripts. The boxes are given in colorful sections, but the essence is as follows:

────────────── ┌────────────┐ ╔════════════╗ ■■■■■■■■■■■■■■ ██████████████
│ TESTBOX 01 │ │ TESTBOX 02 │ ║ TESTBOX 03 ║ ■ TESTBOX 04 ■ █ TESTBOX 05 █
────────────── └────────────┘ ╚════════════╝ ■■■■■■■■■■■■■■ ██████████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ◘◘◘◘◘◘◘◘◘◘◘◘◘◘ ░░░░░░░░░░░░░░ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▌ TESTBOX 06 ▐ ▌ TESTBOX 07 ▐ ◘ TESTBOX 08 ◘ ░ TESTBOX 09 ░ ▒ TESTBOX 10 ▒
▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ◘◘◘◘◘◘◘◘◘◘◘◘◘◘ ░░░░░░░░░░░░░░ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓ TESTBOX 11 ▓
▓▓▓▓▓▓▓▓▓▓▓▓▓▓

************** -------------- ############## ++++++++++++++ ==============
* TESTBOX XX * | TESTBOX YY | # TESTBOX ZZ # + TESTBOX AA +   TESTBOX BB  
************** -------------- ############## ++++++++++++++ ==============
°°°°°°°°°°°°°° ~~~~~~~~~~~~~~ """""""""""""" ////////////// \\\\\\\\\\\\\\ 
° TESTBOX CC °   TESTBOX YY     TESTBOX YY   / TESTBOX YY / \ TESTBOX YY \ 
°°°°°°°°°°°°°° ~~~~~~~~~~~~~~ """""""""""""" ////////////// \\\\\\\\\\\\\\ 

xxxxxxxxxxxxxx XXXXXXXXXXXXXX mmmmmmmmmmmmmm iiiiiiiiiiiiii IIIIIIIIIIIIII
x TESTBOX CC x X TESTBOX YY X   TESTBOX YY   i TESTBOX YY i I TESTBOX YY I
xxxxxxxxxxxxxx XXXXXXXXXXXXXX mmmmmmmmmmmmmm iiiiiiiiiiiiii IIIIIIIIIIIIII
wwwwwwwwwwwwww 11111111111111 llllllllllllll iiiiiiiiiiiiii IIIIIIIIIIIIII
w TESTBOX CC w 1 TESTBOX YY 1 l TESTBOX YY l i TESTBOX YY i I TESTBOX YY I
wwwwwwwwwwwwww 11111111111111 llllllllllllll iiiiiiiiiiiiii IIIIIIIIIIIIII
WWWWWWWWWWWWWW MMMMMMMMMMMMMM uuuuuuuuuuuuuu UUUUUUUUUUUUUU oooooooooooooo
W TESTBOX CC W M TESTBOX YY M u TESTBOX YY u U TESTBOX YY U o TESTBOX YY o
WWWWWWWWWWWWWW MMMMMMMMMMMMMM uuuuuuuuuuuuuu UUUUUUUUUUUUUU oooooooooooooo
OOOOOOOOOOOOOO 00000000000000 VVVVVVVVVVVVVV vvvvvvvvvvvvvv zzzzzzzzzzzzzz
O TESTBOX CC O 0 TESTBOX YY 0 V TESTBOX YY V v TESTBOX YY v   TESTBOX YY  
OOOOOOOOOOOOOO 00000000000000 VVVVVVVVVVVVVV vvvvvvvvvvvvvv zzzzzzzzzzzzzz

See also

dialog(1)

Deltamount

Synopsis

deltamount src dest [delta]

Description

This script uses aufs(5) from package aufs-tools to create a writeable directoy which contains the files from src. Unlike a normal bind-mount, the changes made to the files in dests are not written back to src but instead to a third directory called delta.

If delta is not given, a temporary directory will automatically be created for it.

See also

aufs(5)

Find Double Windows Filenames

Synopsis

find_double_windows_file_names

Description

This script is an alias for the following pipeline:

 find . | tr A-Z a-z | sort | uniq -d

It checks if any file or directory names exist that would be considered “equal” on platforms whose file systems do not act case-sensitive (like Windows).

Rationale

This script is most useful when merging multiple directories of the same folder structure that originates from a Windows platform.

A typical example is the installation of game mods for Windows games: They often come in case-sensitive 7z-files and after extraction the files do not become part of the original game’s file structure but rather add a new directory besides the existing one that only differs in its writing (like. DATA vs. Data vs. data etc.).

When running applications in Wine, they will only see one of the respective directories. Hence the need to avoid this situation.

See also

ma_rename_normalize (documentation further below).

Gimp Convert to Indexed

TODO MORE DOCUMENTATION FOLLOWS HERE / WORK IN PROGRESS


Ma_Sys.ma Website 5 (1.0.0) – no Flash, no JavaScript, no Webfont, no Copy Protection, no Mobile First. No bullshit. No GUI needed. Works with any browser.

Created: 2020/10/26 22:02:08 | Revised: 2020/10/26 22:25:34 | Tags: mdvl, shell, script, linux, virt-manager | Version: 1.0.0 | SRC (Pandoc MD) | GPL

Copyright (c) 2020 Ma_Sys.ma. For further info send an e-mail to Ma_Sys.ma@web.de.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.