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

learn more… | top users | synonyms (1)

-2
votes
0answers
18 views

Command to display the first ethernet network and the first wireless network interfaces' names [on hold]

For a Bash script I need a command that displays the first ethernet network and the first wireless network interfaces' names. For example, for my actual laptop the output of this command would be ...
0
votes
1answer
20 views

How can I scan all connected USB drives for a file?

I have an install of Ubuntu and I would like to run a script (bash, perl, python, whatever) that will scan all connected USB drives and report if it finds a text file. Could anyone guide me on how to ...
1
vote
2answers
28 views

Terminal auto complete adds aditional \

I am having the issue with my terminal and tab auto complete. If I try to auto complete using TAB for any file or folder that has a space in the name it is adding an \ before the space. For example ...
0
votes
1answer
22 views

How to run multiple scripts each of which runs forever through one script?

Suppose I have the following two scripts: #!/bin/sh while true do #Do something sleep 1m done and #!/bin/sh while true do #Do something else sleep 1m done called First.sh and ...
1
vote
1answer
15 views

Jar print convert and print “$?” to 0

I have a clipscode which I want to insert in my database I wrote a Java prog for that and it is running fine in eclipse IDE if my clips code contains "$?" it preserved as it is in eclipse IDE. see the ...
0
votes
0answers
47 views

How can I make this script shorter? [closed]

I created this script for my friend to use for youtube-dl and it was the first script I wrote it with assistance from my colleague. Now, the result was perfect but I found the script to be very ...
-2
votes
1answer
31 views

for f in files returns sections separated by space

I have the following code arrFiles[0]=0 cd "/home/thenok/Documents/Link to thought diary" for i in $(find -type f ! -name "*~"); do arrFiles[0]=$[arrFiles[0]+1] arrFiles[arrFiles[0]]="$i" echo " ...
0
votes
0answers
9 views

how do I open two Chrome browsers on a dual screen configuration, each browser in its screen

I need to code a bash script that runs on start-up and opens two Chrome browsers on a dual screen configuration Ubuntu 14.04.3 LTS. Each Chrome browser should open at a preset web URL(page),in a ...
1
vote
0answers
23 views

How to make a key stroke recorder (for non-malicious purposes)?

When you first look at this question and its title you are going to assume that I want this for malicious purposes, however that is not the case, it is because I type a lot of things, and sometimes ...
2
votes
0answers
32 views

Script crashes when starting from .desktop file

When I execute script from terminal by hand, it runs without problems: gksudo /path/to/module.sh But when I use .desktop file to run script on startup: [Desktop Entry] Type=Application Exec=gksudo ...
2
votes
3answers
37 views

$JAVA_HOME resets after every terminal login

I just installed openjdk-8-jdk. I already had openjdk-7-jdk installed. When I ran echo $JAVA_HOME, it printed /usr/lib/jvm/java-7-openjdk-amd64. So I tried changing the $JAVA_HOME variable but it ...
0
votes
1answer
21 views

FTP Users Authentication error: 530 and File Formatting

I have a script I am trying to run as a cron job. When typing the script in via a terminal there is no problem tho I am replacing the variables with the actual value. #!/bin/bash cd ...
4
votes
1answer
40 views

“$: command not found ” is printed each time at the top of the terminal when I start it. Why is it doing so?

I get this error whenever I open a new terminal: $: command not found sandeep@sandepp:~$ It works as usual without any problem but why is it showing that message at the top? My laptop has Ubuntu ...
1
vote
1answer
62 views

.sh to run terminal command

This is probably insanely simple but I'm sort of new to this and have no idea what I'm doing. Very simply, I have MouseON.sh that when ran, I want it to open a terminal, run a command, then close the ...
0
votes
2answers
30 views

Adding further variable to until command

I have the following command which works ok but I would like to add a further variable in somehow: #!/bin/bash x=40000 until [ $x = "180000" ]; do dd bs=1 if=static.file of=extracted${x}.file ...
0
votes
1answer
29 views

What does the “command” command do? [duplicate]

I recently accidentally discovered that command is a command, however typing --help or -h after it only seems to yield results similar to this: bash: command: --: invalid option command: usage: ...
0
votes
1answer
23 views

Terminal blank and not executing commands

I have been trying to set up a Python virtual environment with Django and pip on my Ubuntu VM through the terminal using these guidelines. I last logged out of the terminal after trying to install ...
3
votes
2answers
162 views

sudo: ./abc.sh: command not found

Commands typed in terminal: chmod 777 abc.sh sudo ./abc.sh Every shell program is giving the same error: .sh: command not found Including this simple abc.sh program: #!/bin/bash # My first ...
4
votes
1answer
179 views

How to mask stock command in Bash

I have a function that I run often from the CLI, so I gave it the short name t: $ which t /home/dotancohen/.bin/t $ cat `which t` #!/bin/bash ctags-exuberant -f php.tags --languages=PHP -R $ ls -lh ...
2
votes
2answers
32 views

Script to copy files to folders with the same shared template names

Can anyone help me to define a script which would copy multiple files one by one to multiple folders in other destination based on their shared template names? For example I have several folders ...
1
vote
3answers
61 views

sh: all commands “not found”

I was updating my PATH variable in .bash_profiles and /etc/environment and I rebooted the system (Ubuntu 14.04). After login, I got these errors: -sh: 1: id: not found -sh: 12: [: Illegal number: ...
1
vote
0answers
45 views

Ruby/RVM with @global gem - bundle run fails with `require': cannot load such file — bundler (LoadError)

I study linux for 1 month. While I tried to make all steps from Migrating from MySQL to Postgres on Heroku I've got an error I could not handle. When I try to install the mysqltopostgres gem from ...
0
votes
0answers
8 views

Can bash wrapline according to a tab?

Right now in bash, if a string of characters is too long for the window to display, it wraps the text, slicing words in half, and does not keep the tab indentation set at the beginning of the line. ...
1
vote
1answer
13 views

Synchronization schedule

I have two computers connected to the same home network. I would like to synchronize certain folders between the two. In the past I already used unison for this purpose and I think this could be a ...
0
votes
0answers
26 views

Conditional shell script execution on NAS

I've got NAS, more specifically QNAP TS-251 running Ubuntu (but kind of modified one - it doesn't have terminal). Since none on QNAP forum was able to answer me, I've decided to create a post here. ...
0
votes
0answers
20 views

How can I make a script wait for the XServer before running?

I have created the following script: #!/bin/bash   exec 3>&1 4>&2 trap 'exec 2>&4 1>&3' 0 1 2 3 exec 1>/home/diet/1_auto_update_script.log 2>&1 ...
0
votes
1answer
16 views

no permission to run -rwxrwxrwx 1 tux tux 19 Jan 23 12:46 idea_tmp_check.sh file

I try to get IntelliJ running. It complains that it can't run idea_tmp_check.sh file. I changed the permissions to 777 -rwxrwxrwx 1 tux tux 19 Jan 23 12:46 idea_tmp_check.sh Trying to run it from ...
-1
votes
1answer
49 views

bash: /home/trotteville/root/bin/thisroot.sh: No such file or directory

I know there are some similar questions in here, but I want to know how did this occur. The Terminal started displaying this after I deleted a folder named root in my home directory, but I assumed ...
1
vote
1answer
50 views

running a command for fixed time and getting output in a file

I want to run a command for fixed time and get the output in a file. getting output to a file can be done using command > file and restricting a command to run only for fixed time can be done by ...
3
votes
1answer
53 views

GCC --disable-nls, --enable-languages, --without-headers Unrecognized

I'm trying to make a bash script that will install a gcc cross-compiler for i686-elf on a Debian computer, but I keep getting the same error: configure: creating ./config.status config.status: ...
1
vote
1answer
25 views

Can you explain eval expression in the default .bashrc

I was looking inside /etc/skel/.bashrc and found this line: [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" I understand what the test -x does, but everything onward with eval ...
3
votes
2answers
42 views

Logging script output to a file

I wrote a simple script to monitor my gpu clocks and temps. I wanted it to, aside from being visible on the terminal, log its output on an external file. How could I achieve this? My script below, for ...
0
votes
1answer
22 views

Permission denied when using bundler commands

I am pretty much completely new to Metasploit so I may just be having a problem that anyone who is experienced could fix but I hadn't seen any fixes online anywhere. I am running msfvenom -p ...
0
votes
1answer
42 views

File got deleted when moving to parent directory

In Terminal, the working directory was set to /mnt/qq/iso. I wanted to move a file from this directory to the parent directory qq, so I entered: mv -v boot-repair-disk-64bit.iso ../ Instead of ...
0
votes
0answers
16 views

Changing audio effect automatically

Can we change audio effect automatically(in a interval) while playing song? for example "Full bass" -> "Rock" "Rock" -> "Soft" picture is from vlc extended settings for changing audio effect manually ...
0
votes
2answers
28 views

running dd multiple times on same file with a counting variable for outputting multiple files

Hard to cram what I'm trying to do into the title this is to process the command multiple times: dd bs=12345 if=filename.static of=filename+variable(number_counting_upwards).suffix ...
0
votes
3answers
62 views

Command 'ls' showing directory size instead of block-size

Is there any ls parameter which I can use to display file-size for directories as well. When I do ls -s, it shows me block-size(4k always) instead of directory size. Thank you!!! Edit - Partial ...
1
vote
1answer
39 views

User home folder size limit

I am trying to find anything on the web no success. Is there any way to limit size of home directory for user ? Or any directory ? The best would be by percentage for two users 45% and 45%. But by ...
1
vote
2answers
99 views

Add a multi-line text with one variable to multiple files using bash

I want to create a script that puts a multi-line text as a header in multiple files with txt extension. But the text to be inserted also includes the name of the file in which it will be inserted. ...
0
votes
1answer
28 views

Ubuntu users - access to file of different user

I am just messed up with users of Ubuntu. I just have two users of my system: father and son Now I want to have access to all of my son files. But not by using sudo. It must be automaticaly. Now i ...
0
votes
1answer
36 views

sudo ssh-add /root/.ssh/id_rsa return error

I m trying to save ssh authentication with the command ssh-add for sudo usage: linux$ sudo ssh-add /root/.ssh/id_rsa Could not open a connection to your authentication agent. but as indicated it ...
0
votes
2answers
114 views

convert txt file to csv seperated with tabs

Sorry people I'm new to Linux, and while I looked through the list of answered questions, I don't know enough to recognize if my question was answered. Or if I can adapt one of the answer to my ...
0
votes
3answers
26 views

Convert Number of Decimals Through a Text File

This question's solution may revolve around perl, sed or awk and unfortunately I am not familiar with any of those. My purpose is to convert a computer-generated text file to give it more ...
-1
votes
0answers
35 views

bash: /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh: No such file or directory and bash

bash: /usr/local/bin/virtualenwrapper_lazy.sh: No such file or directory Is showing up each time I start the terminal. I installed virtualenvwrapper, by using: sudo pip install virtualenvwrapper ...
0
votes
0answers
32 views

which dependencies am I missing for Corsair water cooler Link driver?

I'm attempting to install an open-source linux driver for my Corsair h100i GTX water cooler. I'm following these instructions. Once I run the script or try to change setting through terminal I get ...
0
votes
1answer
34 views

How do I run an executable in a directory I added to PATH?

I added a directory to my PATH by doing PATH=$PATH:~/Documents/Clang but when I type ./clang, Bash says No such file or directory. Why is that?
1
vote
1answer
20 views

When does script invocation require path/script.sh

I distinctly remember reading that when $PATH does not include the working directory Linux script invocation requires the path even if the path is ./ and so the script invocation is ./script.sh ...
0
votes
1answer
18 views

Why can't my non admin users use mlocate command?

I have a node.js software agent running on 14.04 not able to run many of his bash scripts on a new server. The problem I seem to have is the limited user returns nothing from the locate or mlocate ...
0
votes
1answer
34 views

Bash script to dynamically find and construct the url and download

I would like to write an script which opens a URL (not a complete URL link) and finds the latest available version of a file. Then, it will go one level up from that directory, find some file in that ...
4
votes
3answers
185 views

How to start or kill tasks when the core temperatures goes above/below a specific value?

I would like to write a short script that gets launched manually once and then should: run a command if all temperatures are below x °C. pause the command if any temperature rises above y °C. ...