Bash is the shell used in Ubuntu's command-line interface.

learn more… | top users | synonyms (1)

0
votes
0answers
17 views

How do I remove W: Duplicate sources.list entry [duplicate]

W: Duplicate sources.list entry http://download.opensuse.org/repositories/home:/osmc/xUbuntu_14.04/ Packages ...
0
votes
1answer
22 views

Packaging bash script with dh-make

I have installed dh-make by installing other packages as recommended by this page which depend on it (I am listing all packages which could have installed it as well because I am not certain which one ...
0
votes
1answer
23 views

shell script for wifi connection via terminal

How to write shell script that will automate interactive steps to connect to wifi via terminal? Steps outlined in How do I connect to a WPA wifi network using the command line? with further details: ...
2
votes
3answers
139 views

How to label occurences of text?

I would like to convert blue blue red green to: color.1=blue color.2=blue color.3=red color.4=green Any leads on how to tackle this? sed, awk, etc.?
0
votes
2answers
25 views

Bash “move files” error message

I am trying to move some files based on a search pattern using bash but I get an error message. Here is the borrowed script format I used and the error message. Thanks! #!/bin/bash firstdir=dir1 ...
1
vote
1answer
24 views

bash - using lftp to mirror specific files from remote folder

I want to mirror files from a remote directory via ftp. The following code works: lftp -c 'open ipaddress; user myusername mypassword; mirror -e /files/ /home/user/files/retrieve/; quit' However, ...
1
vote
1answer
23 views

cannot exec 'anything' : no such file or directory screen

I’m running some call of duty game servers with screen. I have a start.sh: #!/bin/bash user=cabe game=cod verision=cod1.5 server=xxx.xx.xxx:28970 mod= ip=xxx.xx.xxx port=28970 punkbuster=1 ...
1
vote
0answers
17 views

How do I run as bash script from a WebApp?

I currently am developing a custom Ubuntu dist. that runs a dedicated Kiosk app upon boot. I would like an easy method to shutdown from inside the Kiosk app, but I am currently at a standstill at what ...
-1
votes
0answers
28 views

Can notes from Google Keep on an Android device be sorted using the command line? [on hold]

I have been trying to figure out if it is possible to sort Google Keep notes from a terminal, but I am not that good with Android. Does anyone know if Keep notes on a connected Android device can be ...
0
votes
1answer
38 views

Run any bash script in Terminal application from within file manager context menu? [duplicate]

this question is simple about "Open/Run in Terminal".... Looks Ubunutu doesn't support bash/shell-scripts the way we know from KDE and any other OS: I tried the obvious: Right click in file ...
0
votes
1answer
21 views

Script is not pausing until I type soff

The script is automatically calling the signoff script instead of pausing until I type "soff"? Also a user should not be able to start this script "signon" again while it is running. Below is what I ...
1
vote
2answers
54 views

Can i call Cpp Program in Bash file?

I am new in Bash Programing... I wanna call my C++ Program in Bash file. my prog is: myProg.cpp #include<iostream> using namespace std; int main() { cout<<"Salam! World"<<endl; ...
1
vote
2answers
51 views

Is there a command to round decimal numbers in txt files?

I saw this post, but I was wondering if there is a simpler command to round decimal numbers. I have a file with milions of numbers: 0.1 1.2 3.8 I want to round them to integer 0 1 4 Is there a ...
1
vote
1answer
19 views

How to print an octal value's corresponding UTF-8 character in bash?

I expected printf %s '\<octal_character_value>' to do the trick, but it doesn't: printf %s '\101' Outputs: \101
0
votes
0answers
24 views

copy an entire vm to dvd/cd disc?

I am writing a series of scripts on ubuntu for process control. I have needed to install several packages such as gawk and stress. I am doing this for a university project and will need to submit it ...
0
votes
1answer
11 views

Error when adding torrents to deluge with python: User does not exists

I am trying to write a python script to download my tv shows automatically as soon as they become available. I got the basics done. But i cant get to add torrent to deluge via deluge-console. The ...
0
votes
2answers
119 views

Open a file at a certain position and read one byte in bash

Since two persons already voted to close this post, I'll try to make the question as clear as possible. A file on a physical device is represented as a binary sequence. That being said, what I need to ...
2
votes
1answer
69 views

What are the differences between executing shell scripts using “source file.sh”, “./file.sh”, “sh file.sh”, “. ./file.sh”?

Have a look at the code: #!/bin/bash read -p "Eneter 1 for UID and 2 for LOGNAME" choice if [ $choice -eq 1 ] then read -p "Enter UID: " uid logname=`cat /etc/passwd | grep $uid | ...
0
votes
3answers
65 views

Linux equivalent for «cmd /C start “Title” “C:\Folder\file.bat”» [duplicate]

I have a Java program that runs a batch file on Windows with Runtime.getRuntime().exec() using the following command: cmd /C start "Title" "C:\Folder\file.bat" The Java program ends quickly since ...
1
vote
1answer
19 views

Bash script behaves fuzzily

I'm using this bash script to check if the content of two paths install and install1 passed as arguments is the same: #!/bin/sh du -a $1 | grep -Po "[0-9]+\t$1/\K.*" | sort -n > list.txt du -a $2 ...
-2
votes
0answers
29 views

backup script located in root's home directory [on hold]

Create a backup script named backup.sh located in root's home directory which will use tarwith gzip compression to back up the files located inside /etc (including /etc itself and its subversion ...
1
vote
1answer
33 views

Check if a screen is active and then display countdown

#!/bin/bash DATE=$(date +"%m-%d-%Y") Backup_from="/home/mc/server/prison/" Backup_to="/home/mc/backups/PRISON-$DATE.tar" echo "Starting backup of $Backup_from to $Backup_to" screen -dmS backup tar ...
1
vote
1answer
29 views

Custom environment with gnome-terminal

I tried to put this into the startup applications: gnome-terminal --working-directory /media/Data/work/ -e '. .env/bin/activate' where .env/bin/activate represents my virtualenv. For some reason, ...
0
votes
0answers
10 views

How can I remove the ubnoxious subscript that appear on some torrents

Hi I would realy like to know if there is a terminal command to remove the writing that sometimes appear on torrents like the banner titles and so on
9
votes
7answers
808 views

How to display the paths in $PATH separately

I cannot figure out how to list the various paths in $PATH separately in so that they look like this: /bin /usr/bin /usr/local/bin etc. Does anyone know the correct variable for this?
-3
votes
0answers
29 views

Print second vowel using provided loop!

FS=$'\n' for j in `cat $1`; do #Reads the text file in the centre of the screen echo " ___________________" echo " ...
0
votes
2answers
69 views

Print second vowel in word in red color

How do I print the second vowel in a word in red or blue color. Let say I execute my script called "script1" which reads a text file. My script should be able to print the second vowel in every word ...
1
vote
1answer
19 views

Using variables as paraments for commands in a bash script

I currently have a bash script which I can simply double click to remote desktop into my institution: #!/bin/bash xfreerdp -f -u myusername -d campus -p mypassword --ignore-certificate website.com ...
5
votes
2answers
132 views

How to use zenity file selection

I am new to zenity and I am trying to make a simple script for loading a file using zenity --file-selection and the wc command to get the word count of that file. I have successfully made a form which ...
-1
votes
1answer
43 views

Display specific characters in specific time from a text file

How can I display a specific number of words or characters in a given time using a loop. Lets say I want to display 120 words in one minute. Here is the loop i have tried: FS=$'\n' for j in `cat ...
0
votes
1answer
44 views

awk print output redirection

I am writing a bash script, and in that bash script I have a line similar to this: awk '/TextToBeMatched/ { print; print "TextToInsert"; next }1' "/Path/to/specified/file.extension" And currently ...
4
votes
2answers
184 views

Print only one line at a time from text file

how can I print or display only word from a text file at a time. When I run my script it should only display each word from the text file one by one, but only display that word. This is what I have ...
-1
votes
0answers
43 views

bash ssh warning when connect to raspberry: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

First of all, I would like to tell you that I have tried so many solutions for my problem, but none of them helped me. (I tried for example this: http://ubuntuforums.org/showthread.php?t=1346581 and ...
0
votes
1answer
15 views

Templates directory in Ubuntu: can I use this feature with gedit in bash shell?

Saw this question: What is the "Templates" folder in the home directory for? But I wanted to know whether I can use this feature with gedit in bash shell? If yes How? If no is there any ...
0
votes
1answer
42 views

Bash script in terminal on boot

Is there any way to run a .sh script in a terminal window on boot? My computer boots slowly and I want to be able to press the button and leave to save a lot of time. This script is a looping ...
0
votes
3answers
50 views

Substitute specific char sequence inside filenames

A friend of mine grouped tons of files in this way on windows After I made him switch to Ubuntu, files are no more ordered based on the number of exclamation marks in front, so I would like to know ...
3
votes
4answers
68 views

How can I divide output with delimiter?

I would like to change: e·ver·y·bo·dy to: e·ver·y·bo·dy e·ver·y·bo· e·ver·y· e·ver· e· A for loop will be greatly preferred.
2
votes
0answers
22 views

What setting controls this feature in my .dialogrc file?

I'm writing a bash script for personal use that uses dialog. My script is #!/bin/bash DIALOG=${DIALOG=dialog} $DIALOG --title "Title" ...
1
vote
1answer
24 views

How to write a bash completion to complete director names starting at ~/

Imagine I have a bash script called myscript that will only echo it's first argument, which will be a directory name. Example of usage: myscript proj1 Where proj1 is a directory for example located at ...
0
votes
2answers
47 views

How to Keep Text Consistent in A Shell Script

Good Day! I am creating a Shell Script so I can then use it to do X (Won't tell) This is my Current Script clear echo Ahmad A Kazi echo IDNO: BD_3456 echo echo Data Clear Program echo c 2015 Ahmad ...
1
vote
1answer
39 views

How can I print a variable to a file?

How can I print the contents of a variable into a text file? For example, I have the following script: #!/bin/bash #My Bash echo "saisir votre nom" read $name I would like to print the contents of ...
2
votes
1answer
107 views

bash: /home/…/program: cannot execute binary file

I've got a problem with simple program. When I try to run it double clicking it. Also when I try to run it by writing its path in the termilal and it says bash: ...
1
vote
1answer
32 views

How to move all subdirectories to current directory?

I'm new to shell script programming. Suppose we have a file hierarchy like this: /A/B/C/D /A/B/E/F/G /A/H/I /A/H/J/K Note that here we not only have /A/B/.., but also /A/H/.... All letters are ...
1
vote
4answers
45 views

Bash - IF and && syntax?

I could use a little help with my IF and && statement. It's not working and nothing I'm trying is working either. Maybe someone can see the issue: if [[ $thisvariable="yes" && grep ...
3
votes
2answers
300 views

copy to clipboard current path from console with no mouse [duplicate]

I'm wondering if it possible to copy to clipboard output of pwd command. I often need to copy some path and I have to select it with mouse, do several clicks and that is annoying for me. What I want ...
0
votes
1answer
42 views

What does “.bashrc or prepend the Anaconda install location” mean?

I installed Anaconda from root, after completion of installation this message was displayed on terminal screen: Python 2.7.8 :: Continuum Analytics, Inc. creating default environment... installation ...
5
votes
1answer
110 views

Shell scripting bash: How to detect Alt+N keystroke?

I want to write a script that always listens in the background and execute a particular command when the user hits a specific key combination such as Alt + N. How this can be done?
0
votes
1answer
19 views

Website Files Permissions

I am trying to set all folders and subfolders (directories) to 755 and all files that are contained by folders and subfolders to 644. I don't know how can I do this from 1-2 commands. Is this even ...
1
vote
1answer
16 views

Diffrence among environment/profile/bash files

I know the difference among ~/.bash, ~/.profile vs. /etc/profile. I know (please correct me if I am wrong) configuration in ~/.bash is applicable for a specific user and terminal only.Configuration in ...
1
vote
1answer
23 views

How to install novo-builder?

Recently,I want make a Ubuntu live CD. However I don't know how to install novo-builder. The document is Install_Novo_Builder.bash. How to install novo-builder by .bash?