The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
3answers
180 views

Why do I have to change into my private bin folder to execute an .sh script?

I have a private bin folder in my home directory. It's is also in my path. If I try to run a script from anywhere else in my system but within that folder, I get sh: 0: Can't open [name of ...
0
votes
1answer
34 views

Help Starting Minecraft Server Ubuntu 14.04

My .sh file to launch the server is not working. I have the file named 'craftbukkit.sh' with this pasted in it (from the bukkit set up wiki) #!/bin/sh BINDIR=$(dirname "$(readlink -fn "$0")") cd ...
1
vote
1answer
25 views

Ubuntu 14.04- 100% usage of one core

I just upgraded my Ubuntu to 14.04, and I have one small problem. One core of my i5-4670k is 100% used. There are no tasks in the background. How can I fix this?
0
votes
1answer
55 views

Start program after login in Ubuntu

I try to run Jira after Ubuntu start. In /etc/rc.local I wrote this: cd atlassian/jira/bin; ./start-jira.sh (all directories wrote properly) Where is my mistake? Full rc.local: gists
2
votes
1answer
136 views

Cant read variable from user input in bash

I try to run script of my friend and I get this error when try to input some variable: : bad variable nameead: reload : not foundsh: 10: bin/reload.sh: bin/reload.sh: 11: bin/reload.sh: Syntax ...
0
votes
1answer
45 views

Make all new .sh file executable

One of my script is making new .sh files in /tmp/ folder how can I setup that all new files in /tmp/ folder will get chmod -x automaticaly because my script is failing when trying to run scripts in ...
-1
votes
3answers
63 views

Create a script that takes a word as an argument from the user

echo "Enter your string" read str; How can I put in a check to make sure the user passed in a word, displaying a usage statement if a word was not passed as an argument.
1
vote
4answers
121 views

How Can I Run an Shell Script With .desktop Config File?

I am trying to run a shell script with a .desktop file but it doesn't seem to work, producing an error of There was an error launching the application at each attempt. I have the sh and .desktop files ...
0
votes
1answer
71 views

Echo to file apparently needs double escaping backslash (\\\n) to write \n. Why?

As per the graylog2 docs, I need to add this line to my rsyslog.conf: $template GRAYLOGRFC5424,"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msg% \n" ...
0
votes
1answer
47 views

Need Help Improving Script

I have a group of folders (L1N-L5N), in which I want to copy from my /home/michael/documents/XXX to my Dropbox folder. At present, I have used the following script: #!/bin/sh cp -ra ...
0
votes
1answer
394 views

Installed TeamSpeak 3, won't open. 14.04

I installed Ubuntu yesterday, and I still struggle with a couple of things but I'm getting used to it. I want to install TeamSpeak 3 to talk with my friends, but I just can't make it like people do on ...
-1
votes
1answer
292 views

Can't run .sh file

Hi i am returning user of ubuntu, and i am trying to get label, and the problem how to run two files sh files in the terminal called: install-sh.sh configure.sh and i have tried to enter from the ...
0
votes
2answers
49 views

Why doesn't this second nohup command run?

Everything runs except the last line: #!/bin/bash xinput set-prop 11 "Device Accel Profile" -1 xinput set-prop 11 "Device Accel Velocity Scaling" 1 xinput set-prop 11 "Device Accel Constant ...
0
votes
1answer
57 views

Use alias inside a script

One of the software tools I'm using requires "sh" to be a symlink to "bash" instead of "dash". Since I don't want to change the default shell to bash for the whole system and I can't change the tool ...
2
votes
1answer
46 views

Why does the “watch” command starts two “watch” and a “sh” process?

When I tried to run watch ps command I got the following result: Every 2.0s: ps Thu Jul 31 14:06:45 2014 PID TTY TIME CMD 4329 pts/1 00:00:00 ...
2
votes
1answer
66 views

How to compile a SH file so it can be uploaded to PPA Launchpad

I want to make a few installation scripts via .SH files, and then upload them to http://launchpad.net? How would I do that?
1
vote
2answers
311 views

sh: 2: source: not found

I am having a problem with the installation of Armitage in Ubuntu 14.04 I have followed this link and everything is Okey http://www.darkoperator.com/installing-metasploit-in-ubunt/ But the last ...
0
votes
0answers
171 views

How to launch sh file without terminal? [duplicate]

Using Ubuntu 14.10 the sh file will only open in a text editor but not opening the game Xonotic and AssaultCube
5
votes
1answer
793 views

sh: echo: I/O error on pm-suspend Ubuntu 14.04

I just installed Ubuntu 14.04 on my Fujitsu Lifebook U772 after a long hiatus with Opensuse and after the install, it appears that pm-suspend works out of the box. A few days of setting up later, ...
0
votes
1answer
42 views

Subshell in script wont print corectly

Why does my shell and subshell only print the first hour in my for loop? It's supposed to loop through all 24 hours in a day but only prints the first hour correctly. { for D in $(seq -f "%02g" 1 ...
0
votes
0answers
38 views

File script not saved as expected

When I try to edit a script (with Sublime Text 3) the file is saved normally. But when I open the same file with gedit, the file is empty. Also when I run the script (.sh) nothing happens unless I ...
0
votes
1answer
401 views

Good shell script to move a file to another location?

I'm trying to write a shell scrip to move a file to a a different location when it's found. And when it's not found to move a file from that different location to its location. This is basically my ...
0
votes
3answers
337 views

Permission denied error while creating file by using script file

I have created a script file called black_list.sh. #!/bin/bash default_card=`head -1 /proc/asound/modules` echo $default_card if [ ! -e /etc/modprobe.d/sound.blacklist.conf ] && [[ ...
0
votes
1answer
123 views

How to launch .sh from third party program?

I have the program Lutris installed on my computer and I am going through adding all my linux games. However some are .sh execs others are .bins and executables which both added fine. the .sh ones are ...
0
votes
1answer
65 views

Trying to install Netbeans 7.4

When trying to install netbeans-7.4-linux.sh, I cannot open my personal folder where the file is located. I try cd /home/myusername/downloads, but I get: File or folder does not exist. If I try to ...
0
votes
0answers
18 views

SH file, direct access [duplicate]

I'm new to ubuntu and I've just installed Android studio (it was a .sh file along with a bunch of other files and folders) I went and did ./studio.sh (as the readme stated) and it worked. However, ...
-2
votes
1answer
115 views

How to make a shell script pipe aware

I have the following script: #!/bin/sh [ "${#}" -eq "0" ] && (printf "%s\\n" "${0}: word ..." >&2; exit 1) _whats() { [ -z "${1}" ] && return 1 [ -z "${2}" ] ...
14
votes
2answers
883 views

What is the difference between grep apple file and grep “apple” file?

What is the difference between grep apple file and grep "apple" file? What does putting the quotation marks do? They both appear to work and do the exact same thing (display same line).
42
votes
2answers
86k views

What is difference between #!/bin/sh and #!/bin/bash?

if I write, #!/bin/bash echo "foo" or #!/bin/sh echo "foo" both yields same. I have seen some scripts starting with #!/bin/sh or #!/bin/bash. Is there any difference between them?