0
votes
1answer
35 views

SH file not executing successfully

I am new in linux. Trying to run sh file which connects the server over FTP or VSFTPD and get some files. Here is my Script #!/bin/sh HOST='IP_ADDR' USER = 'user' PASS = 'password' FILE = ...
0
votes
4answers
43 views

How to open bash files with terminal?

I am new to Ubuntu and I just started learning bash. How can I open bash files through terminal?
0
votes
2answers
42 views

Rename files in subfolders with parent folder names

I have a main directory that has four folders f1, f2, f3 and f4 each of these folders has 10 folders, and each of these 10 folders ff1...ff10 has some .jpeg images with some names lets say image1.... ...
5
votes
2answers
146 views

How can I delete numbered files in a given range?

I have folderA that has some files with a number sequence starting with a_000000. What I want to do is to delete files starting from a specific number: let's say a_000750 till the end of files in this ...
-1
votes
0answers
14 views

After security upgrade on 12.04 I lost several setup.sh files in root directory

Toady, after applying an ubuntu upgrade and restarting my computer, when i first open the terminal, bash began to tell me that a setup.sh did not exist. I thought this to be strange. When I went to ...
-1
votes
0answers
21 views

what does the return “Cc:” mean after exectuting a bash script?

I have written a bash pipeline for NGS analysis which worked well. I then tried to make it work for multiple input filenames with the following at the beginning of the script: for i in filename1 ...
0
votes
0answers
17 views

Bash Script for adding Keyboard Layout to available Layouts

I am writing a bash script to add a layout (Urdu as input language) to the available keyboard layouts. The current status is: script automatically detects the current layout, as a string. adds te ...
0
votes
1answer
24 views

echo “${txtred}Text${txtrst}” color not always working

I have a .sh file through terminal and I'm using echo "${txtred}Text${txtrst}" as a display of what's happening when running the script. But sometimes the color is not red, although I used {txtred}. I ...
0
votes
1answer
29 views

Script Not Running Properly On Server

I am having an issue with my webserver. I am testing it out on a new kernel build and it seems as if I can't get one certain part running on it. All of my scripts work except this one. Every file ...
0
votes
1answer
30 views

How can I create this specific executable in Ubuntu 14.04? [duplicate]

So I'd like to run World of Warcraft's .exe (wow.exe) with the following command from the terminal: __GL_THREADED_OPTIMIZATIONS=1 WINEDEBUG=-all wine wow.exe -opengl The reason for this is because ...
1
vote
1answer
44 views

script.sh run differently when manually opening terminal and when using .desktop launcher

I have a script file script1.sh as shown below: #!/usr/bin/env bash cd /home/userA/scripts . r1.sh when I manually open a terminal and run it using . script.sh it works fine. But when I created ...
1
vote
1answer
37 views

shell file opens terminal and run a sequence of commands in specific order

What I used to do is: Manually open a terminal instance to run the following commands and shell files Run PACKAGE_PATH=/home/userA/package1:/home/userA/package2:$PACKAGE_PAT‌​H run: cd ...
1
vote
1answer
70 views

how to run command in an already opened terminal through a shell script

I'm running a shell script.sh which is supposed to open terminal and then run some commands in this opened terminal. What happens is that the terminal starts but the following commands are not ...
0
votes
1answer
24 views

Desktop Launcher executing a sequence of commands after opening a terminal

I've created a .desktop launcher as shown below which successfully opens terminal. What I want to do next is to run the following commands such as cd home/userA/scripts then ...
0
votes
1answer
35 views

Run some shell files from another shell file in different location

I have 5 shell files in a specific locations on my ubuntu system. I have two users on this system userA which is the main user and userB. Currently I have to manually open a terminal using user userA ...
-1
votes
1answer
70 views

Ubuntu 14.04 - Desktop icon is not running my BASH script

I have a simple script runme.sh which works when i run from terminal. #!/bin/bash chromium-browser "https://askubuntu.com/" But i need to make it now runnable for normal Users. So i place a desktop ...
0
votes
1answer
19 views

Ranger file manager - getting it to open archive files with custom script?

I've acquired a custom bash script which extracts all archive files and waits for input. Below: #!/bin/bash GET="." SCRIPTNAME="${0##*/}" err() { printf >&2 "$SCRIPTNAME: $*\n" ...
-1
votes
1answer
45 views

Use “watch” in executable script

Is there a way to use "watch" in an executable shell script? I mean this script should be launched with a double click, not directly from a shell... Try this script: #!/bin/bash watch gedit I'm ...
4
votes
1answer
88 views

Use custom command to open files

gedit application is set as default application for text files. Supposing I have a script with execution rights in /usr/bin, how can I set that script to be run when I open a text file using Nautilus ...
1
vote
3answers
78 views

Not able to run sed on bash script

I am working trough some legacy code which does not work, I came across a part that is causing problems. I was hoping some one could help me out and fill me in on what is the exact functionality of ...
1
vote
2answers
53 views

Reset History inside a bash script [duplicate]

I want to make a bash script that clears the history i.e. works similarly as the command history -c So I started with the following code:- #!/bin/bash history #displaying history history -c ...
1
vote
1answer
38 views

Shell Script Problem

I decided to make a shell script for basic nmap scanning so I did it like this : #!/bin/bash sudo apt-get install nmap printf "enter the name of site to do basic scan on >>>" read NAME ...
0
votes
2answers
33 views

gnome-terminal profile without bash history

I'm trying to create a profile in gnome-terminal that doesn't store bash history. The easiest way to do that is to run export HISTIGNORE="*", but there is one problem, gome-terminal is executing ...
1
vote
1answer
60 views

Unity - 14.04 - Set Launcher Icon Size - via command line

I've got a few computers, all coming to the end of their life. The first couple have gone and I find myself again having to re-install ubuntu on it's resurrected remains and then laboriously ...
0
votes
2answers
50 views

Open terminal in 'always on top' mode on startup

I want Ubuntu to open a terminal in the lower right corner when I log in, with the always on top mode enabled. I have made a script which does this when I run it from a terminal, but it does not work ...
0
votes
2answers
35 views

End script and restart it with the same options and arguments

Usually !! repeats the last given command. But it doesn’t seem to work in a bash script. Is there a way to end a script and repeat it with the exact same options and arguments given the last time? ...
0
votes
1answer
68 views

Run terminal command (python command) at start up [duplicate]

New to Ubuntu, but have looked everywhere to get this question answered. Found no solution so far. Basically I need to run two terminal commands on startup, which follow each other directly. This will ...
1
vote
1answer
36 views

Make password appear censored in bash script

I am going to make this short and simple. I am making a bash script where the user needs to enter their root password using the read command and it will be stored in a variable. What I don't like is ...
2
votes
2answers
69 views

What is wrong with this script?

So I got this script from this guide: www.tldp.org/LDP/abs/abs-guide.pdf LOG_DIR=/var/log ROOT_UID=0 LINES=50 E_XCD=86 E_NOTROOT=87 if [ "$UID" != "$ROOT_UID" ] then echo "Must be root to run this ...
0
votes
1answer
59 views

Running a .bash file in Eclipse

I know this is really an Eclipse issue but I can't seem to login in their forum. I am running eclipse juno for some c/c++ development.However, I wrote a .bash script that initiate the entire ...
1
vote
1answer
23 views

passing a font as an argument to a script

I am trying to use osdSH for notifications. It has a 'font' parameter that receives a curiously formed string. From the man: -f -font Set font (Default: ...
0
votes
2answers
29 views

Why the same .sh does not work with 2 different users executing it?

I have rwo users User1 and User2. I have this script1.sh inside User2 home folder: #!/bin/bash cd /home/user1 && ./script2.sh that calls script2.sh: #!/bin/bash if [ 2 > 1 ]; then ...
0
votes
1answer
52 views

Complicated script involving command line and XFCE Terminal

I run Ubuntu 14.04 and installed the XFCE Terminal for some reason, and what I want to do is make a script to go to a folder on my hard drive under /Server/Gen2 and run several .sh scripts in ...
2
votes
3answers
419 views

Trouble using cd command with “~” or “$HOME” in bash scripting

We know that ~ and $HOME refer to the home directory of the current user. (For me echo ~=echo $HOME=pandya). But I can't use it in bash scripting. Here is a simple example script: #!/bin/bash echo ...
2
votes
1answer
47 views

script in bash not understood using terminal in Ubuntu 12.04 [closed]

Can anyone tells me what does this script means found in a .sh file:: [ ! -n "$T_R" ] && echo "Message Appear" && exit 1;
0
votes
1answer
29 views

var.sh is not exporting the variable using terminal

I want to export many paths using a .sh script. after running it nothing is exported I don't know why. so if anyone can advise. This is the script used: #!/bin/bash txtrst=$(tput sgr0) # Text reset ...
1
vote
1answer
41 views

Declare a variable when running the script bash

How to declare the variable content when running the script? I know that is possible to use $1 $2 $3 to set a variable when running the script ./script.sh this is sparta, but I did not found a way to ...
0
votes
1answer
76 views

call shell script from php when ubuntu 14.04 (rightly) disables the shell for www-data

I just migrated from 12.04 to 14.04. 14.04 (sensibly) disables login / shell for www-data. But my php site needs to run some shell scripts to run stuff like kindlegen, rsyncing files to another server ...
0
votes
0answers
29 views

Permissions when running second level script

Evening Everyone, I have 1 bash script that starts the program Motion (some may be familiar with). Motion links to a script in the motion.conf upon picture save or file save to a perl script that ...
2
votes
2answers
76 views

installing a script in $PATH

I am trying to use yeoman in Ubuntu. Everything is installed correctly but I can't use the command yo from bash. If I navigate to the appropriate directory and run node cli.js everything works from ...
1
vote
2answers
51 views

Cannot run an executable file in terminal [closed]

I have been running my script ./runenb a couple of times. I decided to log the output into a file so I used: ./runenb >output.txt and it works. Then I tried again and this time I did ./runenb > ...
1
vote
2answers
32 views

Startup script for brightness

Not so long ago I replaced XP for Lubuntu 14.04 on a old PC, and it works great. To make it perfect, I want to autoexecute "xrandr --output VGA-1 --gamma 3:3:3 --brightness 1" on startup or boot. ...
-3
votes
1answer
31 views

How to put separated values together? [closed]

I would like to ask since I'm new to this environment on how I will going to make those separated values as one value together? For example: 38734 34 3542 232 Where I want 38734 and 34 to be ...
0
votes
1answer
100 views

Can't install HoNClient-3.4.3.sh

I'm desktop user. My OS running 32-bit Ubuntu 14.04LTS. The problem I've run into is this: When I try to run the client in the terminal, using the command: sudo sh HoNClient-3.4.3.sh it gives me ...
0
votes
0answers
56 views

Lost graphical login after automating script command

I'm running Ubuntu 12.04 LTS and I want to log all input/output from users. I've simply tried adding script -a -f /LOG_files/Log_file.txt to users ~/.profile. The logging works just fine, but ...
1
vote
2answers
46 views

Shell scripting, [duplicate]

I made a simple update script. Now My question was is it possible to run it automatically by loggin in on the Ubuntu Desktop and automatically provide my password (sudo) for this so I don't have to do ...
-1
votes
1answer
84 views

Shell scripting add slashes in file name with space

I am a newbee and want to write a shell script in which I will look up in a certain directory for zip file and unzip it to certain directory. File name can have spaces like this "Harry's 20 july.zip" ...
0
votes
1answer
31 views

don't have permission or doesn't exist

I'm trying to configure an Oculus rift and I have a configuration script that needs to be executed: GLADOS@deathbox:~/Desktop/OculusSDK/Tools/OculusConfigUtil$ ./OculusConfigUtil_i386 bash: ...
0
votes
0answers
15 views

Script to automate launch of various terminals and various commands [duplicate]

I am trying to use a script to automate various proccesses when I launch the script. I use this to restart postgresql and metasploit services then launch armitage echo -e "\033[32mRestarting ...
0
votes
2answers
44 views

Running a .sh from a .desktop [Making an icon for Minecraft.]

Rather recently, I've decided to add minecraft to my dock. I play it enough to want it on my dock. I created a .desktop file, and I gave it an icon, name, and such. I figured that point the exec at ...