Why did “terminal commands” never get a version of SQL “parameterized queries”?

I was taught horrible bad practice when I initially "learned" SQL, which baked in user-submitted input with quotes and attempted to "escape" this (in the beginning, I didn’t even escape it at all…). I then had to spend many years unlearning this, to instead do things like:

SELECT * FROM table WHERE id = $  1; 

And then the $ 1‘s data is sent separately to the database, not part of the actual query string, to make it impossible for "SQL injections" to happen.

However, terminal commands frequently need to be sent untrusted user input, such as:

generate_PDF.exe --template="a path goes here" --title-of-report="arbitrary title from user" 

Every time I have to run such a command, I’m scared to death that my "terminal argument escape" function isn’t working correctly, or has some unknown bug, so that users can make a title along the lines of "; rm -rf /; to execute arbitrary code on my machine.

This becomes even more of a serious issue when the normal "OS quotes" cannot be used, such as:

pg_dump --format custom --file "a real path" --exclude-table="schema name"."table name" 

The "schema name"."table name" part has to be provided in full from the user, and thus I have to attempt to verify the syntax myself, as it cannot just be quoted in its entirety with the "terminal argument escaper" function wrapping it all. (Even if it might be possible in this specific context, I’m talking in general and just using this as an example of when it gets "hairy".)

This has made me wonder why the terminal commands, for example in PHP (since I use this myself for everything) cannot be done like this:

pg_dump --format custom --file $  1 --exclude-table=$  2 

And then we send the actual arguments separately as an array of strings, just like with the "parameterized queries" in SQL databases?

Please note that the $ 1 and $ 2 here do not refer to PHP variables, but to "placeholders" for the "engine" which interprets this and which lives either in PHP or the OS.

Why is this not a thing? Or maybe it is, only I haven’t heard of it? I’m continuously baffled by how many things which I constantly need and use just "sit there and rot" while they keep releasing a new programming language every week which nobody uses. I feel more and more frustrated about how "stale" everything I care about seems, but this risks getting off-topic, so I’ll stick to the question I’ve just asked for now.

How can I make terminal UIs accessible?

I am looking for resources (software, studies, documentation) to help inform design decisions for making command line utilities accessible.

Most of the programs I work on are command-line utilities. Many are non-interactive, but the more complex ones are “TUIs” or terminal UIs.

These TUIs have features such as tabs, interactive navigation, progress bars, key bindings etc..

I am not familiar with adaptive software for terminals (is there an equivalent of a screenreader?) and therefore am not sure how these types of TUI features may impact users with vision or motor impairments.

Terminal does not open on customized LiveCD

I followed this tutorial on how to create a customized LiveCD and tested the result in a VM as well as by booting the physical machine with it.

Thereby, I found out that the created LiveCD system is not able to open the terminal application properly (or the application crashes before the GUI is displayed).
If I open the application, I can see its name and icon shortly in the menu bar (see picture below) before it disappears.
enter image description here

The terminal GUI does not show up even after waiting for several minutes.
Other applications (e.g. the browser, file manager, libre office…) can be started easily.

It seems like I made a mistake in one of the steps of the LiveCD customization but I have no idea where I can start searching for it. Therefore, I would like to know:

  1. Which steps of the tutorial are likely to influence the terminal behavior in the built CD?
  2. Is there a specific log I can lookup (or post here) to find out why exactly the application is not opening?

Thanks for your help!

Terminal is not opening from GUI in ubuntu 18.04

I accidentally deleted python from the lib folder, because I saw multiple versions of python.

1) initially GUI was not loading, the only terminal was working then I upgrade with the command: sudo apt-get upgrade --fix-missing

After that, I can access GUI but from GUI I am not able to access terminal.

I have tried all shortcut options and also tried clicking on the terminal icon but the terminal is not opening.

But When I do Ctrl + Alt + f3/4, I moved on terminal and Ctrl + Alt + f1 for GUI.

Please help me out here, so that I can open terminal as normal way from GUI

Byobu terminal with function in bashrc

I am using byobu with tmux:

byobu version 5.127 tmux 2.8 

I have the following function defined in my .bashrc to monitor logs.

function monitor_log() {     IFS='\n';     watch -n 1 'tail -n 100 /var/log/syslog'; } 

I have the following lines in my windows.tmux

new-session -AD -s 'test'; new-window -n monitor monitor_log; new-window -n general; 

The problem is the byobu is not opening a window named “monitor”. From the window numbering, it appears that the window is getting closed abruptly. Is there any way to “log” the byobu/tmux?

Thanks in advance!

How do I turn on popup blocker through terminal?

I’m trying to create a shell script to configure Firefox settings. I am currently trying to figure out how to turn on the popup blocker. Right now, I am adding the line user_pref("dom.disable_open_during_load", false); to the end of the prefs.js file. However, whenever I open Firefox, the popup blocker still isn’t turned on. How do I do this?

how do i move all files from one folder to another in terminal

I have searched various forums with variations on the question –

I am trying to move all files including those in sub folders from one folder to another – just the files not the folders.

This command works for directories

find ~/Desktop/ -type f -print0 | xargs -0 mv -t ~/Videos 

but this command I tried for folders does not

find ~/Desktop/Folder1/ -type f -print0 | xargs -0 mv -t ~/Videos/Folder2