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

learn more… | top users | synonyms (1)

0
votes
0answers
21 views

Strange terminal color setting issue

I am running an Ubuntu 14.04.1 LTS server (3.13.0.45) which I usually access over SSH. I set up a custom prompt with the following in my .bashrc file: # uncomment for a colored prompt, if the ...
0
votes
1answer
32 views

Concatenate a variable onto the end of another variable or string in Bash

I need to create many variables that begin with "precip" followed by a dynamic string which is a read in variable. I read this variable in, let's say its "1971" and then I increment it by 5 a bunch ...
2
votes
2answers
61 views

How to set a proxy for terminal?

I am looking to set a proxy for terminal. What I need is I want to send all terminal communications to the internet through a proxy, say tor. I tried to set a system wide proxy set up. But Terminal ...
0
votes
1answer
39 views

Text appearing on top whenever I open terminal

Whenever I open my terminal I get this text at the top: bash: export: ...
0
votes
1answer
51 views

type command in bash

I'm learning bash and while trying the "type" command with an argument like "cd" (type cd)which should return cd is a shell builtin but it throws no such file or directory. What could be the ...
0
votes
0answers
21 views

cannot send mail from home with mutt

The message I send from how show up in my email instantly, from home, they never arrive. I don't not have a postfix server running, so I cant get return mail. How can i trouble shoot this? echo "This ...
0
votes
2answers
36 views

Whitespace Problems With Script and Variables

I'm trying to beat my head against the syntax of this. I'm getting problems with whitespaces and I can't see if there's a better way to do this. vardir=/home/user cd $vardir for i in $(ls "$vardir") ...
0
votes
2answers
41 views

sudo dpkg fails when trying to install wifi driver (on mac)

I finally created a persistent USB that runs on Mac, after a couple of weeks of failure after failure. However, now, I've run into the problem that the wifi doesn't work (because Ubuntu doesn't have ...
0
votes
1answer
61 views

How to recover a deleted Folder(/Desktop in this case)

I have accidentally deleted(in a way) or I can say dislocated reference to my /home/user/Desktop directory , Is there any way to undo what I have done. The following Describes what I have done $ cp ...
-1
votes
1answer
96 views

/bin/bash: g++: command not found error 127

I was trying to install a software quicknet from a tar.gz file. After using ./configure when i tried using make it showed the following erroe g++ -I. -I. -c QN_args.cc /bin/bash: g++: command not ...
0
votes
0answers
58 views

Ubuntu 14.04 Anaconda Install Help

I started using ubuntu not to long ago. I am trying to install Anaconda on my linux distribution. Am following the instructions below: http://docs.continuum.io/anaconda/install.html#linux-install ...
0
votes
0answers
31 views

Adding a file/directory to a specific location (on the Desktop) [duplicate]

I use Ubuntu 14.04.(Unity Desktop Environment) I like to use a specific part of my desktop(the screen) to store files related to my current work, and certain other spaces to store images and others. ...
0
votes
1answer
23 views

Partition not loading automatically - Ubuntu [duplicate]

So I store my websites on a partition of my laptops hard drive. Programs and my bash scripts say that this partition does not exist, until I personally open the partition up by clicking the icon on ...
1
vote
2answers
36 views

bash command starts new process

I have noticed that whenever I just execute the command bash in Terminal that it appears to have executed successfully with no output. I have also noticed that then when I want to close Terminal I ...
1
vote
3answers
72 views

How can I input to a file directly from the terminal

Other than bringing up a text editor, is there a way I can input text in a linux terminal directly to a file? (then enter a control code such as ctrl-c, to end the input) I'm pretty sure there's a ...
0
votes
2answers
43 views

How to find and replace word or character in paragraph using bash script?

I want to write a script which take input as a paragraph. In that paragraph I want to find and replace a word or a character provide by the user and display the new paragraph with the changes. I also ...
1
vote
2answers
88 views

bash sorting multiple duplicate strings in a file

I have file like below: Personname:Mark Hobby:chess Hobby:tennis Personname:Tom Hobby:swimming Hobby:badminton Hobby:boxing Hobby:music Personname:Nick Hobby:swimming Personname:fabio Hobby:swimming ...
0
votes
1answer
62 views

bash- Control-C behavior (^C) / gksudo vs sudo

This is about how the ctrl+c key press has a different effect when performed to a gksudo instance as opposed to a sudo instance. I executed the following using gksudo to read an installation failure ...
3
votes
7answers
476 views

How to see if no output from `ls *.xls` command?

Ubuntu 14.04.1. I have a bash script, called by cron every 10 minutes, which basically looks for files in a subdir, then loops through and process each file. But how do I check if there are no files ...
0
votes
2answers
59 views

Export $DISPLAY value in Shell script

I am trying to Print the value of $DISPLAY under my Shell script. I have Following shell script which Exports the DISPLAY: #!/bin/sh export DIPLAY=:10.0 Here, each time I need to change the Value ...
2
votes
4answers
70 views

Alternative way to run a sudo command on startup

I am trying to write a script for my Ubuntu system to hibernate, whenever the amount of battery left is (say) 5%. This script will run on startup. I can get the battery left using upower -d |grep ...
0
votes
0answers
28 views

how to use crontab to execute i2cset commands

I am trying to execute a bash script that displays the IP address on a lcd display , on startup .. I want it to execute so that the user knows the ip address as soon as the user starts the linux ...
0
votes
1answer
52 views

How to extract from a specific column data and sort them as well? [closed]

Need to script some bash commands for the following: Arrange, print and save to a file after sorting countries with (highest to lowest) population for 1962. Arrange for country Angola population to ...
0
votes
1answer
34 views

How to use i2cset to display the ip address

I am trying to use the i2cset command to display characters on my LCD screen. For example i2cset -y 1 0x3e 0x40 0x49 displays I and so on. Now I want to try and display my ip address. I had posted ...
1
vote
1answer
29 views

execute the enscript command in cron job fails

When executing my backup bash script, all goes fine including executing two lines of enscript (enscript converts a log file to .html and.pdf format in my case). Problem is running the same script ...
0
votes
0answers
109 views

Batch processing folders with `find` and imagemagick's `montage`

So I've been working at this for a while and I think I'm ready to give up. I trying to process sub-folders with imagemagick's montage to create contact sheets. This is basically as close as I've ...
-2
votes
1answer
53 views

compare strings in two files and update the status [duplicate]

i have following data set in text file data.txt: d1,40,gold d2,30,silver d3,20,bronze d4,10,iron d5,5,wood d6,20,gold d7,10,wood d8,5,god d9,10,silver . . . ...
2
votes
1answer
117 views

bash comparing multiple column in two files with different length

I have following data set in text file data.txt d1,40,gold d2,30,silver d3,20,bronze d4,10,iron d5,5,wood d6,20,gold d7,10,wood d8,5,gold d9,10,silver . . . def.txt gold,40 silver,30 bronze,20 ...
0
votes
0answers
26 views

Why does this fail to make my postfix configuration step non-interactive?

I have a bash script to automate configuration of new Ubuntu systems. It works, except that postfix's process installation persists in bringing up a menu-based interface. I followed the answer given ...
0
votes
1answer
35 views

How to start CAESES free?

I have downloaded the program CAESES free on my Ubuntu 14.04.1 LTS and unpacked it into the folder /home/xyz/Programy/CAESES-FFW_3.1.2_Linux.x86_64. The program developer proposes to use the bash for ...
1
vote
2answers
64 views

How to find (and delete) duplicate files among local disks and NAS? [duplicate]

I want to detect and delete duplicate files (same size) along local Disks and Nas Disks (The Nas Disks are mounted using Samba) I found the How to find and delete duplicate diles answer but I'm ...
0
votes
0answers
36 views

Bash Tab Autocomplete Not Listing Matches

I've found questions detailing this problem or a similar problem but none of their solutions have worked for me. On another box (RHEL some version) I've the ability to tab-complete with a wildcard ...
2
votes
1answer
43 views

Can simple scripts use GUI file manager to select file?

I have an extremely simple script that currently executes a command on a file located in the same folder: command ./file_in_folder option output. It would be better if script asks user which file they ...
0
votes
1answer
38 views

Network scanning script - cronification issues

This is (yet) another query about cron. I have referred to the guide on this site before posting here, but I still can't get this script to work. It is designed to suspend the PC when activity on ...
0
votes
1answer
34 views

How to allow the shutdown of computer using web server?

I have a web server under apache2 and php5. I want to shutdown a computer using web server but to shutdown the computer a current user should be 'root' user because command for the turning off of PC ...
1
vote
2answers
58 views

bash text colon values to html table

i had a big file with more than 10000 recordslike below, this need to be converted to html table i tried various ways with converting into csv and then to html etc.., not able to get the desired ...
0
votes
1answer
36 views

Help with an IF and SED to replace \n

I have a filename variable that sometimes gets set as: attachment; JobRunStatisticsReport_20150122.zip In the File Manager window, it looks like this: I need help coming up with an IF statement ...
1
vote
2answers
26 views

Login screen keeps coming back (bash_completion related)

I'm using Ubuntu 12.04. By accident I deleted /etc/profile.d/bash_completion.sh. I then restored it by copying that same file from another similar Linux machine (same OS). Now I can't login because ...
1
vote
2answers
476 views

Difference between `sudo su` and `sudo fish` [duplicate]

I am running fish (Friendly Interactive Shell) as my standard shell in Ubuntu 14.04, rather than bash. I noticed the following behaviour and don't know, if any of these are the preferred one to gain ...
0
votes
2answers
52 views

How do I use the set command to find directories in my path?

I am taking a linux class this semester and one of the questions on a lab is: Use the set command to find out all directories in your path. Normally, I would just use $PATH to find out the ...
0
votes
1answer
26 views

How to check for any activity on a physical disk?

I have an SD card that's connected via a USB interface. The output of fdisk -l indicates the following: Disk /dev/sdb: 3965 MB, 3965190144 bytes I have a script that re-initializes multiple ...
0
votes
0answers
37 views

Bash script environment can't get exported variable from user

I have a user daniel, from which I'd like to retrieve an exported value as root. So I did some research and came up with this command: $ su - daniel -c '. ~/export_script; echo $EXPORT_PATH' > ...
0
votes
1answer
35 views

Help me remove this Bash error

The bash error below keeps popping up each time I open a new terminal, why is that? How do I fix the bash error below? bash: /home/yonas/.rvm/scripts/rvm: No such file or directory
0
votes
1answer
68 views

Code works in Terminal, but not when in a script

I have: This is my zip file.zip in path $dec If I manually copy this code over to the terminal window, I get the correct output. But, if I take the same exact code and put it into a .sh file and ...
1
vote
1answer
62 views

Differences between md5pass and md5sum

This question may be insane ,but due to definition of hash algorithms, hash algorithms are some kind of functions that accept variable length input and make it encrypted and the output always has a ...
-1
votes
1answer
32 views

“Command not found” after running a file compiled on the same directory [duplicate]

I don't know what is going on... d@d-SVF15A17CDB:~/University/CSC209/a1$ gcc -o remvocals remvocals.c d@d-SVF15A17CDB:~/University/CSC209/a1$ dir remvocals remvocals.c ...
0
votes
0answers
50 views

IF statement not traversed correctly in script responsible for unpacking zip files

I've been working on an IF statement for a couple days now and have been unsuccessful at getting it to run correctly. All of the embedded code seems to work when I manually paste it in Terminal, but ...
0
votes
1answer
16 views

Implementing an if clause in simple bash script

I've got a bash script that makes use of cal -m $v where v is number . The user is prompted for v's value at the beginning of the execution . In case the user presses ENTER instead of introducing a ...
-2
votes
1answer
64 views

How to combine ls and grep to list only files and using ls to count dirs

I have some troubles with combining ls and grep. The thing is that I have to use only ls and grep to list all files in home directory. Ive tried multiple of combinatnions but with no effect. I think i ...
0
votes
1answer
23 views

Syntax for regex in IF statment

I'm trying to come up with the syntax for a regex in an IF statement, but I'm not quickly having success... Can anyone lend a quick hand please? if [[ "$path/$file" =~ .{txt,doc,docx,xlsx,rtf} ]]; ...