Questions tagged [bash]

Bash (Bourne-Again SHell), is the shell used in Ubuntu's command-line interface by default.

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

Need help compiling Crafty chess engine from source

I'm trying to compile an older version of Crafty chess engine (version 23.2) on Ubuntu 16.04. I've never tried to compile stuff before but I did Google about it and have tried various commands but ...
0
votes
0answers
17 views

How do I set up a script to run automatically, whenever my system connects to the internet?

I would like to auto update my system & store apps whenever I am connecting to the internet for the the first time in the login session. How do I do that? The flow would be: User 'X' logged ...
0
votes
0answers
21 views

Audio Driver Missing

I have just installed Kubuntu 20.04 and oddly enough, while using the live usb's os, audio was working. However after installing the os Audio is not working. inxi info inxi -A Audio: Device-1: ...
0
votes
0answers
14 views

Using 'sudo' with `virtualenv`

I am working on a virtual environment: sk, which I made this way: $ mkvirtualenv sk -p python3 I use workon sk to activate this environment and work in it. When I try to run some functionality of ...
0
votes
0answers
12 views

Does Lubuntu 20.04 a shell script to be triggered by a drag-drop action onto an icon?

I just upgraded from Lubuntu 18.04LTS to 20.04LTS and have discovered that some desktop icons (launchers? I don't know the right term!) no longer work. It used to be that I could drag a .jpg image ...
0
votes
0answers
14 views

Trouble Installing BIOVIA DS 2020 in Ubuntu 18.04

I have been checking all system requirements and essential hardware but it does not work out. Please, anyone help me out! $ chmod +x BIOVIA_2020.DS2020Client.bin $ ./BIOVIA_2020.DS2020Client.bin ...
1
vote
0answers
40 views

How to Resolve GRUB Error -Minimal BASH-like line editing is supported?

Unable to update from 14.04 using Software Updater, I downloaded 20.04 to a USB drive, which I then used to boot a Dell Inspiron 15-3552 bought preloaded with Linux / Ubuntu. The installation was a ...
0
votes
1answer
49 views

tar archives error

I need to search for a pattern (string) in all .tar archives and then append the names of archives which contains the pattern (string) provided in a text.txt folder. My code is: for f in *.tar.gz do ...
0
votes
1answer
23 views

ls -R fails to watch files recursively (with entr)

entr is a linux package that takes a watch command and then runs another command upon seeing any file modifications. Examples: http://eradman.com/entrproject/ # Rebuild project if sources change $ ...
-1
votes
0answers
18 views

How to lock a file for administrator (su/sudo password-protected) access only from command line / terminal?

I have some sensitive files that I want to protect from my own impulsivity. They're in ~ (/home) not /dev or /bin; those files are protected by default. However, like system files in /dev, /bin, or ...
2
votes
0answers
41 views

How to create service that will execute periodically bash script (with ssh connection)

I am having bash script that checks for ssh connection in lsof. In case it's down, it will open it once again. I found some information how to create service that starts periodically, but the ...
-1
votes
4answers
50 views

How to upgrade package one by one using apt-get with bash script?

bash script that can upgrade pkg one by one. i think we can create a txt file that contain all upgrade able pkg and we can call every single line in terminal.
0
votes
1answer
18 views

shell script: manipulate input

I have this simple create directory command #!/bin/bash mkdir -p /home/test/$1 I'm running this script like this bash create.sh 2020/06/20/01 I want to get this passed argument and manipulate ...
0
votes
1answer
33 views

Shell script to remove all files inside a folder except one

I am writing a shell script and want to delete everything from a folder with exception of one file. This code does exactly what I am looking for: rm -r -v subfolder/!("file") First, from the shell ...
0
votes
1answer
29 views

syntax error: invalid arithmetic operator (error token is “.00>0”)

Usign ubntu 18.04 my bash script returns the following error: syntax error: invalid arithmetic operator (error token is ".00>0") My code is as follows: echo Enter the number of images to be ...
2
votes
1answer
17 views

A '/' appears in the output of the sdiff command

I am using sdiff command on ubuntu to test my code. python main.py | sdiff - ans.txt At this time, the output is as follows >sequence1: frame1 >sequence1: frame1 ...
0
votes
0answers
52 views

bash: ./(filename): No such file or directory

i am using ubuntu 18.04 and i was writing a code for fastjet using root.but as i was trying to run the code, it showed this error: bash: ./(filename): No such file or directory but there is a file ...
3
votes
0answers
46 views

Not able to run portable chrome .desktop opening in text editor

I installed portable chrome using https://github.com/shivamgly/Google-Chrome-Portable-maker-for-linux this link I am not able to run this chrome. Chrome.desktop file opens in text-editor. ...
-3
votes
0answers
32 views

How do i fix this Linux Terminal Error? [closed]

Im wanting to download a screen Recorder called Kazam, so i run this bash script at the terminal (Linux Mint 19.3 Ubuntu Based) sudo apt install kazam but it went wrong and said that some other ...
0
votes
2answers
53 views

Check if files exist, get the most recent one

If I have these files in my test folder ehsant@lp02944:~/test$ll total 24 drwxr-xr-x 2 ehsant ehsant 4096 May 19 17:54 . drwxr-xr-x 6 ehsant ehsant 4096 May 19 14:45 .. -rw-r--r-- 1 ehsant ehsant ...
1
vote
1answer
25 views

Copying files from multiple directories using a loop

I have a set of single files basename.file, in multiple directories basename_dir. I want to copy all the .file files into a single directory. I have created a .txt containing all basenames. I want to ...
-1
votes
0answers
15 views

Debian cant get back to starting line after saving [closed]

After saving & pressing y the terminal goes off & can't get to the starting point so that i can execute a command. I feel like resetting to factory since I can't even do a backup. Someone help ...
-1
votes
0answers
21 views

What do indicator codes mean? [duplicate]

I've got a question related to the indicator codes of the ls -F output. They are */=>@| So I know that the slash (/) means directory file asterisk (*) means a file that can be executed (binary ...
0
votes
0answers
36 views

How to calculate the sum of two different fields in a soql query

I'm making a query in soql to calculate the mean value of two numeric fields H01 and H02 in a json file, whose values are 0.6 and 0.4, respectively. This query gets a single record. The query is like ...
1
vote
1answer
35 views

How to include configuration from other file in .bashrc and .bash_profile?

I often use use aliases in terminal. But alias command is only effective until I close that session. So, I have to set aliases and variables in .bashrc so they are permanent. But I when use TTY ...
0
votes
1answer
14 views

Find directories within directories ending in 'l0' that do not contain '*18*' in their names

I am currently doing find . ! -name '*18*' -name '*l0*' -type d but it is listing all the parent directories like 'd1_l0' , 'd2_l0', 'd3_l0' etc only. I actually want subdirectories like 'd1_l0/[15*,...
0
votes
0answers
36 views

Create Terminal file to clear cache [duplicate]

I wanna create file that when is open it runs in terminal. To be precise I wanna clear cache every time when I open the file. I wanna put this command into file: sync && echo 3 | sudo tee /...
1
vote
2answers
18 views

How to get colors in Vagrant shell?

In my terminal in Ubuntu, everything is colorful. The username is green, folders are blue and files are white: However, if I login into vagrant vagrant ssh everything is black and white: How can I ...
0
votes
1answer
71 views

How to show only one week with cal/ncal command?

I cant figure out how to show only one week. I tried ncal -w 1 for example, but it shows me 1st year instead of 1st week, is there a way to do it?
0
votes
0answers
15 views

Change line Wayland=true to false with bash without text editor? [duplicate]

How i can change line "Wayland=true" to "Wayland=false" without editing with text editor for making WaylandDisabler.sh script? I want change this line while executing script.
1
vote
0answers
26 views

After updating WSL 18.04 LTS' openssl to 1.1.1g, the /usr/local/ssl/bin path is not being appended to user account's $PATH

Sorry for the long post, but these are the steps I followed and replicated the problem on 1 other WSL 18.04 installation, Windows Version 1903. Environment: Host: Windows 10 Version 1909 WSL: ...
1
vote
0answers
41 views

Bash is trying to run “_update_ps1” after every command, but only when in tmux

I have been working to change my statusline in bash from powerline-shell to the powerline bindings for bash. It appeared like it worked but when I opened tmux, after every command I get the error: ...
0
votes
0answers
23 views

trying to make bash alias on mac

I am trying to follow this explanation of how to make an alias and made the following .bashrc file in my home directory. Here it is: # .bashrc # User specific aliases and functions alias py='python3'...
2
votes
2answers
49 views

Write a file in the middle of a shell script

I have a simple shell script in my Ubuntu 18.04 LTS system, and somewhere in the middle, I would like to write a file with some instructions. I was able to achieve this using echo but the text is ...
0
votes
1answer
31 views

Issues wth launching a file from bash script

Ubuntu 14.04 LTS I am trying to create a Launcher for a program who runs in wine. Problem is this program is launched through a file loader.exe, which appears to be "location sensitive" meaning that ...
0
votes
3answers
36 views

Shell script to create a folder with files name and copy files inside

I have a list that looks like this ABC_100.0_k_1x1x1.xyz ABC_100.0_k_1x1x1.txt ABC_100.0_k_2x2x2.xyz ABC_100.0_k_2x2x2.txt ABC_100.0_k_10x10x10.xyz ABC_100.0_k_10x10x10.txt ABC_600.0_k_1x1x1.xyz ...
0
votes
2answers
21 views

Connect to invisible SMB Server by bash script

I want to run a bash script like: #!/bin/bash read -p "username : " user_var read -sp "password : " pass_var echo printf "//abcde.fghi.de/jklmn /media/localfolder cifs domain=domainname username=$...
0
votes
2answers
17 views

Monitor single Log File

I´m looking for a tool or a skript for monitoring 1 single Log file. I´d like to get a notification via telegram if the log file containes a word I´m passing to it. My approach: #!/bin/sh tail ...
0
votes
0answers
27 views

Directory is getting created with special characters in shell scripts (mkdir)

I am very new to shell script and ubuntu in shell script i am using following commands sudo mkdir /home/microservice cd /home/microservice But when i ls the folders i see weird special characters ...
0
votes
1answer
58 views

How safe is this remote rsync setup?

I'm thinking about security, I've done a specific setup to run rsync over internet and was thinking about security, this is the setup: Destination server has a ssh jail user only with bash and rsync ...
1
vote
0answers
36 views

Bash dialog command — why don't bottom and right borders respect dialogrc colors?

I'm trying to format my dialog boxes using DIALOGRC; I have most of it working fine, however the dialog windows seem to have an issue with their border where the bottom and right borders don't respect ...
1
vote
1answer
34 views

How to output the first N letters of the names of each subdirectory of a given directory?

Need to output the first N letters of the names of each subdirectory of a given directory. I thought to use ls command, but don't know where and how to write names of the files
0
votes
1answer
35 views

How to find a string(pattern) in all type of folders(no archives) from the current directory

So i want to search for a string(pattern not a fixed string) through all types of folder from my current directory and then append the name of folders that contains the pattern(string) to a file.txt. ...
0
votes
1answer
56 views

Green terminal prompt vanished from Ubuntu 20.04

It's a bit silly but as you can see, the initial words (prompt) displayed in the terminal look very simple (as you know, it has like a green color), something I didn't see at first since I executed ...
0
votes
0answers
21 views

Bash code for searching a directory for folders or files and zipping

I'm trying to write code to search a directory and subdirectories for folders with suffix -objects and individually zip them. The zip file would need to be named after the folders being zipped, and ...
0
votes
0answers
19 views

Creating a script that encodes an audio file and JPG together in an MKV in each subdirectory

I am working on a youtube-dl script that downloads the audio files and thumbnails of a batch list and places it in directory like this: downloads/[channel_name]/[video_id]/.audiofile downloads/[...
1
vote
2answers
62 views

How to obtain a consolidated system wide history irrespective of users or powers? [duplicate]

If I am a normal user and I type history I get a set of commands typed by me in the terminal. Now I make myself the sudo su (su stands for super-user here and not substitute user) sudo su I am ...
1
vote
1answer
31 views

xfce terminal: run script on session restore

I'm quite happy with Xfce Terminal and how it restores my windows and tabs when I log in and how it even remembers the cwd for each tab. For Python development, I've added a bash function to activate ...
1
vote
0answers
31 views

How to remount USB device by VID:PID?

I sometimes find that my SanDisk USB stick has failed to mount. I'd like to script in a remount for just this device that is NOT mounted with /etc/fstab. How can I identify the stick(s) and then ...
3
votes
2answers
43 views

How to sum the values in multiple text files?

In Ubuntu desktop 20.04, I have 20 directories, each containing a text file with the same name, "weights". These text files contain ~20-30 numbers separated with a space. In each of the 20 directories,...

1
2 3 4 5
177