Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [bash]

Bash (Bourne-Again SHell), is the default interactive user shell used in Ubuntu. Use this tag for questions specific to Bash, as opposed to generic POSIX shells.

4 votes
1 answer
511 views

Where is git-prompt.sh located in Ubuntu 24.04?

I am trying to customize PS1 so it shows the branch I am when I enter a git repository. To do that I use the __git_ps1 function and everything works fine. My issue is that, according to the ...
anmomu92's user avatar
  • 109
2 votes
1 answer
216 views

How to set default foreground color in Bash shell?

I found the set default background color code from @user313992's answer: On xterm-like terminal emulators: This sets the background to a light green without having to clear the screen: printf %b '\e]...
stackbiz's user avatar
  • 415
0 votes
0 answers
50 views

Why can my command embedded in a script only able to be executed when typed in the terminal?

I wrote a script to get sequences corresponding to some id's. # Process each genome ID in array for id in "${genome_ids[@]}"; do echo "Processing genome ID: $id" ...
Alex Lee's user avatar
-1 votes
0 answers
46 views

Using bash shortcuts in kate

I like to use the bash shortcuts on kate. For example, when I press ctrl+u to delete the start of the line. Is there a way
fsgdfgdfgd's user avatar
0 votes
0 answers
24 views

Can't paste commands into Ubuntu shell command line

I'm very new to Linux and coding in general, and I've been having an issue where I can't seem to properly paste code into my command line. I can paste by right-clicking, but if the source I'm copying ...
Ryebread's user avatar
0 votes
0 answers
25 views

Fujitsu Lifebook T935 Touchpad Not Working on Ubuntu, But Works on Windows

Issue: I'm encountering an issue with my Fujitsu Lifebook T935 laptop where the touchpad does not work on Ubuntu, although it functions perfectly on Windows. Interestingly, the touchpad works on other ...
Mughees Haider's user avatar
2 votes
4 answers
761 views

How can I condense my bash script to look for 42 extensions in a directory

As the question implies, I'm struggling to condense my script to as few lines of code as possible, instead of declaring multiple if statements. The goal of this is to create an automation script in ...
Dylan Coulbeck's user avatar
0 votes
0 answers
31 views

Why can't crontab bash script access user .local directory?

My cronjob is running. But the bash script that is running does not properly invoke another program. Usually, including a full path resolves this issue. I've included a full path in my bash script but ...
www139's user avatar
  • 163
1 vote
1 answer
258 views

Bash: programmatically output text to cursor?

I'm trying to cook up a script to use OpenAI's Whisper as a speech-to-text. The basic idea is I press some key combination, it starts recording to an audio file somewhere, I stop it, it analyzes the ...
Gridzbi Spudvetch's user avatar
0 votes
1 answer
51 views

How to clone folders/files permission from Ubuntu to another Ubuntu?

I have two Ubuntu systems, same version same script installed, on my public Ubuntu I did a mistake by changing permission of root. I ran rescue system and run a script that reset ubuntu permission to ...
Obada Diab's user avatar
0 votes
0 answers
50 views

man what iptables docs for --sport and --dport

It's hard to find the documentaion for --sport and --dport by using "iptables --help" or "man iptables". iptables --help | grep port man iptables | grep port But I can find it ...
stackbiz's user avatar
  • 415
1 vote
1 answer
117 views

rtmp stream continous a folder with files list mp4 , not working

I would like to modify my code to convert a folder with FFMPEG instead of converting a whole list of files, and loop this list: #!/bin/bash while true; do ffmpeg -re -i /myfolder/10.mp4 -...
Allan Tori's user avatar
-1 votes
1 answer
35 views

Copy website files to another site, keeping permissions, and exclude some files

I have two websites, will have more, the same code except config, and some other files. Two brands of same project. Will have more sites - testing site for example. Also, I need to update DB structure ...
LeonidMew's user avatar
  • 2,742
0 votes
2 answers
237 views

Help to write a script for adb connect

To cast my Android phone to my desktop I enter these terminal commands: adb tcpip 5037 adb connect 192.168.0.xxx:5037 scrcpy The issue is the xxx changes daily, which causes me to find the xxx ...
rob grune's user avatar
  • 1,153
0 votes
0 answers
53 views

Why is the command `w` in Ubuntu 24.04 different than older versions

I tried running w (w - Show who is logged on and what they are doing.) in Ubuntu 24.04 and it output: 08:11:52 up 5:23, 2 users, load average: 0.00, 0.00, 0.00 USER TTY FROM ...
Ashraf Kamarudin's user avatar

15 30 50 per page
1
2 3 4 5
752