Skip to main content

All Questions

0 votes
2 answers
24 views

create unique folder on startup with rpi cam

I have a pi cam on a pi zero that needs to run for the whole duration of being on. this pi camera module is being used in stratospheric launch and during our last one we were able to get videos back, ...
purfi's user avatar
  • 1
2 votes
2 answers
365 views

How to prevent a bash script from running repeatedly at the start of the terminal

I am physically connected to the machine an I use Arch linux. I use Arabic in the terminal and I use BiCon to add bidirectional support for the terminal (I am using st). I want the program to start ...
N0tus3r's user avatar
  • 43
-1 votes
2 answers
264 views

Is it possible to translate bash to another human language like Arabic?

Bash commands are written in the Latin alphabet, is it possible to translate them to another language? In this case, Arabic. Arabic is written rtl and I remember I tried it using alias before when I ...
Abdelaziz Baheg's user avatar
3 votes
3 answers
908 views

Alternatives to file polling?

In the following code, I have to poll $tmp_input to continue executing the code because wezterm cli send-text is asynchronous. This makes sure that $tmp_input is ready. tmp_input=$(mktemp ./tmp_input....
wyc's user avatar
  • 143
1 vote
2 answers
5k views

How to run the command "sudo sh /path/to/script.sh" by double clicking?

I have a question from this thread How to run a bash script by double clicking by entering the path in sudoers?. Since it was explained to me that it is unsafe to grant sudo privileges to the script....
moninah's user avatar
  • 15
0 votes
0 answers
73 views

BASH: Is there a way to READ the current foreground and background color in use? Not CHANGE them... just see what the user is using NOW? [duplicate]

Some background for any who find this later This is a question about colors being applied in the shell. NOT about how to CHANGE said colors (there's a bajillion answers for that). But how to READ them....
NerdyDeeds's user avatar
1 vote
2 answers
613 views

How to scan with ocr bash script

To streamline the scan process I intend to create a script that scans and applies OCR in one step. However my bash skills are rather poor, so I would be very thankful for a bit of help. Here my ...
alex's user avatar
  • 1,013
1 vote
0 answers
297 views

Login directly through terminal to a new GNOME session passing user and password as input parameters

I would like to know if there is any possibility to login directly to a new GNOME session without the need to put the login and password using automation tools like pyautogui, xdotool, uinput... (I ...
user568513's user avatar
0 votes
1 answer
400 views

terminal output is broken in docker compose output

Im facing an issue with how the log in docker compose looks like, seems somehow broken as shown below ==> Emulator is ready : '1' is not completely override the previous output "please wait&...
Amr Kamel's user avatar
  • 121
1 vote
2 answers
322 views

split folder in subfolders keeping parent directories and based on percentage. Using terminal

I have a directory with many subfolders that look like the following, (keep in mind that FA and T1 content is paired and also ..._L, ..._R content). The quantity of folders named here by letters (a,b,...
Al_Mt's user avatar
  • 13
0 votes
0 answers
396 views

How do I export functions from profile.d scripts for use in interactive shells?

I have some scripts that I install in /etc/profile.d which define functions that should be exported and made available on the command line. Example script looks like: # This function should be ...
Jason C's user avatar
  • 1,565
0 votes
1 answer
64 views

How can I remove all files by pattern from bash with except for specific files? [duplicate]

I try to automatically remove all files from directory but exclude the specific files The syntax $ rm *.!(vmx*|vmd*) works good if I run it from terminal, but if I create some bash script file (for ...
morris's user avatar
  • 13
1 vote
1 answer
156 views

How is it possible that this doesn't work even if you use quotes?

I know that to deal with spaces in file names you should wrap the entire file name between quotes but this is not working for this script, indeed what is happening is the exact opposite, it only works ...
user avatar
3 votes
3 answers
3k views

Accurately overwriting previous lines of bash terminal output when text is wider than terminal (e.g. wraps mutliple lines)?

TL;DR - I know how to overwrite lines of output normally but none of the methods I've used previously (e.g. printf '\e[1A\e[2K') or have found online seem to work when the line being overwritten is ...
zpangwin's user avatar
  • 1,021
1 vote
1 answer
936 views

Bash macOS terminal Ctrl+C to kill all processes

I was trying to pipe the rsync output to a custom function, and use that to output custom information accordingly. log_output() { while read -r dir; do last_slash_index=$(echo $dir | awk -F &...
Donald Zhu's user avatar

15 30 50 per page
1
2 3 4 5
7