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

learn more… | top users | synonyms (1)

8
votes
1answer
426 views

How do I open the man page for square brackets math and what are they called?

I have been working with them for a while now (math equations in $[], not the arrays) arrConflicts[0]=$[arrConflicts[0]+1] currentCombination=$[ (arrFiles[0]-1+arrFiles[0]-i)*i/2-arrFiles[0]+j ] ...
2
votes
1answer
84 views

Shell script needs to be run twice to work as expected

I have the following shell script: #!/bin/sh # 1. Kill the process along with the screen /usr/bin/pkill -f reportPrintingServer.jar # 2. Start the printing server again. /usr/bin/screen -S proRps -...
0
votes
1answer
283 views

tor command is not starting Tor Browser

I wanted to install Tor on my new Ubuntu (14.04) install. I followed all the instructions and tried to start tor. It starts correctly if I navigate to Tor's directory and run: ./start-tor-browser....
0
votes
0answers
102 views

Sudo, nohup and spewing detached processes

I have a jar file that I need to routinely kick start from the terminal, and needs to be run as root. I'd also like to leave that terminal open for use, so I'm using this bash script: $ cat /usr/...
2
votes
1answer
43 views

Why to use bash in executing script? [duplicate]

In a former question, I was suggested to execute: sudo bash start-dfs.sh why not sudo start-dfs.sh ? I mean, what difference does bash makes?
-1
votes
1answer
121 views

Putty SSH client command history? [duplicate]

I connect to my server via Putty SSH client. With the key ↑ I see previous entered commands, one by one. I just wondering is there a some command, which show all previous entered commands out of a ...
1
vote
2answers
39 views

How to know what options each command has?

I've been using linux for quite some time now and I have a question burning in my head. I'll use the mount command as an example. When you see the manpages of mount it says that you use the command ...
5
votes
2answers
80 views

Serialise shell commands

I'm looking for a way to "stack" commands from the terminal prompt so that only one at the time is executed: First enter a command, press enter, execution starts, back to shell (like &) I can ...
0
votes
1answer
43 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
36 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
72 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
18 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 ...
-2
votes
1answer
43 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
26 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
41 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
45 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
177 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
37 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 root/mqsql-...
4
votes
1answer
261 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
84 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
33 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
50 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
43 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
455 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
207 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
54 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
527 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: ...
0
votes
0answers
224 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
9 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
31 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
81 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
32 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
39 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
142 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 ...
0
votes
1answer
102 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 ...
2
votes
1answer
153 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: ...
2
votes
1answer
96 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
123 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
46 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 android/...
0
votes
1answer
48 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
22 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
84 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 count=(...
0
votes
3answers
88 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
205 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 ...
0
votes
2answers
237 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
40 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
213 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
540 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
37 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 human-...
0
votes
0answers
139 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 ...