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

learn more… | top users | synonyms (1)

0
votes
1answer
23 views

Issues Installing a Tool Set

I am working on a research project that requires me to utilize data from NASA's Fermi Large Area Telescope. NASA provides users with a package of tools to manipulate and utilize the data they'd be ...
3
votes
2answers
80 views

Is there a way to autostart CPULIMIT in order to reduce excessive CPU consumption

tracker-miner-f, tracker-store, tracker-extract and dropbox processes are killing my CPU, they make it run at over 100%, overheating my laptop. I have installed CPULIMIT and it works great ...
3
votes
4answers
160 views

Sequentially changing directory and running a script

For the life of me, I cannot find any help on this at all. I have, say, 2000 directories that I need to run a specific program in. Due to program limitations, it cannot simply write 'Output1', ...
1
vote
0answers
30 views

Permission change after moving file? [duplicate]

I want to run a bash script in a directory /media/aliakbar/New Volume(internal drive)/further/path/to/file . The problem is: with chmod +x the file's permission is not changed (proof: I couldn't ...
1
vote
1answer
52 views

bash: syntax error near unexpected token `(' in README of trainset14_032015.rdp for mothur

I'm trying to run the README for the use of the trainset14_032015.rdp in mothur (http://blog.mothur.org/2014/10/28/RDP-v10-reference-files/), but when I get to this step it doesn't work, showing this ...
0
votes
1answer
30 views

How can I open a browser tab after resuming from sleep?

I've bashed around on this one for awhile, no pun intended. I just want to open my todo list url in my browser every time my computer wakes from suspend. The command to do this normally is easy: ...
1
vote
1answer
50 views

I keep getting bad substitution error on bash scripts with arrays

I've been working on a Bash script using an array. I keep getting this message, "Bad substitution". So I Googled the problem and every example I came up with supposedly works but not on my computer. ...
4
votes
1answer
52 views

Where is the system-wide $PATH variable set?

I am using Ubuntu Desktop 14.04, and as such, I am using the non-login shell. When I open the GUI terminal, first the non-login shell sessions read the following startup files: /etc/bash.bashrc ...
-1
votes
0answers
74 views

run sudo script at startup [duplicate]

Im trying to run this script at startup #!/bin/bash sudo iwconfig wlan0 power off Unfortantly I dont know how to put my password in the script to run it at startup with sudo privelages assuming ...
-1
votes
2answers
55 views

BASH text editing [closed]

Currently working on a project where I need to edit the text on a bunch of nearly identical spots. Basically, I need to turn this 30 SCF Done Ti 52.3941 48.0198 49.5622 Ti 49.4797 49.061 ...
0
votes
2answers
52 views

I screwed up my system no commands work at all

Command 'make' is available in '/usr/bin/make' The command could not be located because '/usr/bin' is not included in the PATH environment variable. make: command not found It happened after I did ...
2
votes
1answer
25 views

How to filter out device info from `usb-devices` using VID & PID?

To answer questions regarding USB devices here and sending kernel patches, I need output of usb-devices command. Or more full sudo cat /sys/kernel/debug/usb/devices. But it gives a lot of output ...
2
votes
1answer
21 views

Setting paths in Fish like in Bash?

I've got this in my bash_profile, and I can't figure out the equivalent in Fish: export PATH=$PATH:~/Dev/ark/bin export PATH=$PATH:~/bin/ export PATH=$PATH:~/i386-elf/bin/ export GOPATH=~/Dev/gocode/ ...
2
votes
1answer
86 views

Find and Rename recursively in folders, subfolders and multiple files

I'm new with shellscript and I'm having some problems trying to do what I need... I want to 'optimize' all my *.png images and found this so I made the bash as it says with: #!/bin/bash pngnq ...
2
votes
2answers
37 views

How to list all files in a hard disk with 'find'?

I'd like to list all the files in HDD including size, last modified date and absolute path. idea format : [file size] [last modified date] [absolute path] [ filename] I tried: ls -lhR | awk -v ...
1
vote
3answers
73 views

Bash shell for loop process with two paired variable names

It's common to use bash shell for example to bulk rename plenty files. Usually I used the following structure, for file in ./*.short do # do command done That's for filename with .short extension. ...
0
votes
0answers
26 views

Upload images with curl to image hosting bash

I can upload images to a simple html/php host with curl but i do not understand how this works with sharenxs.com or stooorage.com I tried to use live HTTP header and firebug but i cant find any ...
4
votes
3answers
76 views

Getting internet browsing history from shell

is it possible to use the shell or generate a shell script to find out the browsing history from the browsers installed on the system? thank you
0
votes
0answers
39 views

Path given in Environment variable shows empty after reboot

I am trying to set environment variable CATALINA_HOME for tomcat server. I used the command CATALINA_HOME=/usr/local/apache-tomcat-8.0.22 JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386 and export ...
1
vote
3answers
103 views

Using sed to add text to a file before and after word

I have a file with words, one word per line, which I now want to change so that is becomes a .sh-file with an egrep-search string for each word. The search string I want in the end looks like this: ...
0
votes
1answer
26 views

Chromium app closes after executing the bash script by double click

I have a chromium app which i want to execute from a bash script. I am successfully able to execute this command from terminal and able to open the app but when i tried to double click the script the ...
0
votes
1answer
118 views

Ubuntu Terminal Command “cd -” makes a Loop!

Well I am fairly new in Ubuntu world. New to Terminal too. Asfaik I can use the command cd - to go back to the previous directory. Now lets say I am in a directory which is home/dir1/dir2/dir3/mydir. ...
2
votes
1answer
51 views

How can I ignore errors with specific keywords in bash?

I am aware that I can ignore ALL errors like so: command 2>/dev/null But I want to ignore only specific errors. For example, if I run: cp file I get the error: cp: missing destination file ...
2
votes
4answers
92 views

Tally up results from a grep search?

Say I have a list such as this: 8 382.34.6 sally sally 8 923 183.3.3 183.3.3 183.3.3 8 And I want to tally up the number of times each unique value repeats and get output like this: 8 3 382.34.6 ...
1
vote
0answers
35 views

System freezes during Bash auto-completion with Tab or Ctrl+R

It started about a week ago, don't know why. Now, when I type something like cd somedir and click Tab, my system completely freezes for about 10 seconds. I can move the cursor but can't switch between ...
1
vote
1answer
29 views

Parse file for recursive pattern

in my dir there are several files with the pattern simulation_y_t for all files with this pattern I would need to check whether in the last line of the file the word hgip comesup or not ...the ...
1
vote
0answers
32 views

Making tab completion look anywhere in the word

This completion mode probably has a name, I just don't know what it is. In Sublime Text the auto complete works in a way that the typed letters are searched for in the same order but they are not ...
5
votes
1answer
51 views

Use the bang-commands (e.g. '!!') of bash in scripts and aliases?

Is it possible to use the so-called bang-commands (! + command/symbol, like e.g. !! or !$:p) in bash scripts and in bash aliases? I wanted to add the line alias getit='sudo apt-get install !!' to ...
-2
votes
2answers
38 views

Name files after split command

there is a large file I split in bash. I am using split -l 20000 -d "job1" "job1" where job 1 is the input file - how can I change the naming of the output so that it produces ...
2
votes
2answers
32 views

how to pipe output of traced bash debugging?

I want to pipe the output of traced script as follows: bash -x /path/to/a/script | more or bash -o xtrace /path/to/a/script | more and bash -x /path/to/script > a_file or bash -o ...
0
votes
0answers
34 views

Error executing “./configure” command : bash: ./configure: No such file or directory

I have downloaded CiscoPacketTracer6.2.tar.gz file. Now I want to install it. The command I have use is tar xvfz CiscoPacketTracer62Student.tar.gz Then I navigate to that directory using cd ...
1
vote
0answers
69 views

Script with xdotool not working properly on a fresh reboot

I want to run streamus (chrome app) to stream youtube from terminal and asked a question relating to that in this same SE. I also got a wonderful answer and a script for my problem. But that script ...
12
votes
3answers
2k views

What is the meaning of the following code?

Can anyone explain what does this command mean? PATH="${GZIP_BINDIR-'/bin'}:$PATH"; export PATH
4
votes
1answer
165 views

Delete lines in several files in a folder once (avoid infinite loop)

I have several files in one folder, and I want to delete the first lines in all of them. If I do this: sed -i.bak '1,2000d' *.dat the first 2000 lines are deleted, but then the filename is still of ...
0
votes
1answer
47 views

I want to write weather data via a python script twice a day to a csv file [closed]

Is this practical? How do I accomplish it? Some barriers I've come across already: I have separate scripts for weather and time. How do I format them into one comma-separated row? how do I print ...
1
vote
1answer
122 views

How to run streamus app from terminal

I use Streamus to stream music from you tube. I want to know whether streamus can be started from terminal itself. I have asked this question in main software site and the author recommended to use ...
0
votes
2answers
67 views

Difference between C programs and shell scripts receiving signals from fuser

I have written the shell script below for a lab in my college. It must look at a log file being upgraded frequently from another process and create a number of copies passed at invokation. Here is the ...
3
votes
3answers
92 views

Move files from specifically named folders / move files up one level

The goals is to move files out of the lowest level folder, back up one directory. This does a great job but moves files higher up the folder hierarchy as well. find . -name '*.jpg' -type f -execdir ...
0
votes
2answers
48 views

How can I use convert to resize images to a specific width keeping the ratio for the height? [duplicate]

I have a file with the full path to an image on each line, all are jpg. I want to resize every image/line in the file to 1024px in width, while keeping the aspect ratio for the height. I simply want ...
5
votes
1answer
34 views

Help with Alias [duplicate]

I frequently use: find /home -iname foo* 2> /dev/null The 2> /dev/null suppresses any permissions issues and leaves legit matches. I tried creating: alias lost=find /home -iname ${1} 2> ...
0
votes
1answer
48 views

running python packages from user local directory

I'm on a Shared hosting, with a limited SSH access. don't have sudo privileges. And there are some limitations on some folders, as the following: This is the output of the termial ls -al : ...
0
votes
0answers
37 views

shell script in /etc/profile.d not running at startup [duplicate]

I have a shell script at /etc/profile.d/pg_local.sh. It contains the following contents: export PATH="$PATH:/usr/local/pgsql/bin" Its supposed to load that path in the user accounts' $PATH when the ...
0
votes
0answers
31 views

Pass to the script keyboard key pressed after hotkey has invoked a Bash script

I assigned a custom hotkey Ctrl+Q to launch my bash script. #!/bin/bash read -s -n 1 key zenity --info --text "$key pressed" I'd like to have a script to detect which key followed the hotkey. Say ...
0
votes
0answers
16 views

Inotifywait is moving multiple ffmpeg segments instead of one at a time

I have come to a dead end looking for a solution on my own and will ask for your help please.... Thanks for all info you may have.... I capture 30 second segments of video and write to a folder in ...
49
votes
5answers
3k views

What does “apt-get install !!” do and how to make it work?

I have seen someone typing apt-get install !! He did that a few times and every time, a different program was installed. It seems like it automatically figured out what is needed next. However, ...
0
votes
2answers
45 views

Permission denied error during “hadoop namenode -format” command

I am trying to install single node hadoop cluster using this tutorial. I followed all the steps as mentioned the above link says but I am not able to format the namenode using command hadoop namenode ...
1
vote
2answers
52 views

Unzip a file to its current directory

I've figured out that extracting a .zip you need the path to the directory as well when you are recursively looking through subdirectories. So how do you store the path? This is nearly there but ...
3
votes
3answers
151 views

Store a filename in a variable minus the extension

File: test.zip Bash script while read filename; do zip_file=${filename} # do stuff done; Value stored in variable = "test"
0
votes
1answer
40 views

no echo in bash shell script loop

In this script, the second echo statement doesn't do anything. #!/bin/bash echo "Start folder create..." find . -name "*.zip" | while read filename; do foldername="${filename%.*}"; mkdir -p ...
2
votes
1answer
213 views

Shell script with select command to show a list of files

I've written the attached bstls.sh shell script which uses the command select to choose the subfolder or file in a folder passed as argument on which execute the ls command. #! /bin/bash #Personal ...