-2
votes
1answer
21 views

How to put separated values together?

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
27 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
31 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. So 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
39 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
44 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
15 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
26 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 ...
1
vote
2answers
36 views

How to run perl script in background

I am new user to ubuntu... Putting & and in the end is putting the application on background, but not really, it still gives me the output of the perl script in my command line even though it is ...
2
votes
3answers
237 views

Setting a randomly generated password to a variable?

I'm using the following line to create a randomly generated password in a bash script, but it doesn't look like the string is actually being set to the variable. #Generate random password ...
0
votes
0answers
9 views

Create startup script for openproject [duplicate]

I consider myself a linux noob, but I was able to install openproject on a Ubuntu 12.04 server in VirtualBox. Currently I have to manually start the web-server every time I power-up the virtual ...
0
votes
4answers
34 views

SSH remote command execute stays without disconnect when finished execute?

I am trying to build a script/command that will restart our Asterisk/Elastix service on our PBX. The script is basically using simple command with auto log-in public key that run from Ubuntu ...
0
votes
1answer
33 views

Unigine Heaven run directly from terminal?

I think a lot of you would have benchmarked your Linux system using Unigine Heaven Benchmark 4.0. I know to run the it you can simply go to the Unigine Heaven folder and run the shell script file ...
5
votes
5answers
282 views

Needed simple script/loop/command for input command, execute and output within textfiles

Suppose I have list of commands in text file as below (cat cmdlist.txt):- cut lshw top awk sensors Now I want to get simple information on that command by whatis cut, whatis lshw etc. respectively ...
1
vote
1answer
65 views

sed “Permission denied” and “No such file or directory” errors while building Clockwordmod

Whenever I execute the command build/tools/device/mkvendor.sh samsung_aegis2vzw /your/path/to/the/boot.img I get this as the output build/tools/device/mkvendor.sh: line 83: /sedcommand: ...
14
votes
2answers
2k views

Installing breach browser

EDIT: Just look at the accepted answer. I wasn't how it worked at the time of writing so I just guessed below. I am new to Linux so this might be a noob question. I am trying to install a new web ...
0
votes
1answer
40 views

one column from output column on awk

Suppose which I have this table: one two three four two three four five three four five six four five six seven five six seven eight so I wrote awk -v word=two '$0 ~ "[^[:alpha:]]" word ...
1
vote
1answer
25 views

Pass variables to script which called script

I have a bash script which must call another bash script which varies per-user in order to get some configuration information, like so: somescript: #!/bin/bash ${HOME}/.ssconfig echo "Hello, ...
1
vote
2answers
44 views

Unable to run shell script inside VI/VIM

I am trying to run a shell-script say test from vim #!/bin/sh echo good morning Now when I am using :!% I am getting a pop like shell returned 1 Press ENTER or type command to continue instead ...
0
votes
1answer
34 views

Multiple background scripts in one command

I can run three scripts at once like this: python script1.py ; python script2.py ; python script3.py But when I try to run them all in the background, like this: python script1.py & ; python ...
2
votes
2answers
235 views

Convert seconds since epoch to a human readable string

Command date +%s produces 1403568422. Is there an easy way to convert the 1403568422 to a human readable UTC timestamp? python -c "import datetime;print ...
1
vote
2answers
80 views

How to execute a command several times in the terminal with/without a few minor changes?

Suppose that I want to execute the command ls ten times (despite of it being purposeless since it will only display the directory contents 10 times), is there an equivalent to writing the following: ...
6
votes
1answer
56 views

Create a script to open firefox with some google search term from terminal

Is there any way to create a script or a program that will open firefox, go onto google and search for the arguments passed to it ? So something like google How do I shoot web should open Firefox ...
0
votes
2answers
69 views

script terminate

# Check if VPNC is already running, otherwise start it if ( ps -ef | grep -v grep | grep -v vpnc_ondemand | grep -v less | grep vpnc > /dev/null ) ; then echo "Shell script is already running ...
0
votes
1answer
29 views

Is there other way to get your DISPLAY env without using shell?

I have a script that will get executed by incrond when it sees changes in a watch dir. There is only a few env vars that are available in the script, the rest get cleared by incrond. So this becomes a ...
2
votes
2answers
106 views

Shell Scripting Function question

I have this code snippet I am working on for a small project I am doing: echo "Please enter SUID: "; read $uid uid_Assoc(){ arg1=$1 echo $1; } uid_Assoc Now to start, I would like ...
17
votes
3answers
2k views

Why doesn't “cd” work in a shell script?

What is wrong with this easy script? I just want to write an script which change my directory: A. I put below commands on the file witch its name is pathABC on the /home/alex directory, #!/bin/sh cd ...
1
vote
1answer
68 views

bash script move file to folders based in name

I hope you can help me... I made a perl and bash script to make a backup of my firewalls and tranfers via tftp #!/bin/sh perl /deploy/scripts/backups/10.160.23.1.pl > /dev/null 2>&1 ...
0
votes
1answer
16 views

How to create a script to launch several emulated ROM inside a folder

I would like to create a script to run simultaneously all the N64 Roms that I put inside a folder, reading the names from a text file. Since now I did a script like this: cat ./listN64_full.txt | ...
0
votes
2answers
42 views

Redirecting output to std output or /dev/null depending on optional parameter

I have a script where you can run it just like this ./myscript and the output of some commands called inside the script are hidden, just like this: if mvn tomcat:deploy &> /dev/null; then ...
1
vote
2answers
37 views

Running shellscript with cronjob is making problems, executing manually not. Ideas?

I made a shell script called /home/root/cron_grads.sh (chmodded 755) on my server. In this directory are more grads-scripts like 500hPa_p0.gs (644). My main script creates a temporary file ...
7
votes
4answers
446 views

How to check the process is already running or not

I want to check the particular process in already running or not. I refereed this Q&A. But I didn't get any specific solution. Following is the example that I tried: I have created abc.sh file ...
0
votes
1answer
61 views

Bash script not adding variables to session [duplicate]

I have a bash script that I have added as a startup application. It does a bunch of exports and alias assignment. #! /bin/bash alias devhm='cd ${DEV_HOME}; ll'; alias wlhm='cd ${WL_HOME}; ll'; alias ...
1
vote
3answers
229 views

Python command in bash does not find -c flag

I have two python lines in my bash script, both should run with -c flag, but once I run the Bash script it tells me that it could not find -c flag that is needed for python to run the command in Bash. ...
0
votes
1answer
58 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
3answers
41 views

Append an output of a command to a txt file and place it in non writable directory?

If i try for example : directory A i don't have write permission on it sudo ls -l > /home/A/a.txt bash: /home/A/a.txt: Permission denied Then how can i do this trick , any Suggestion is ...
23
votes
3answers
1k views

Where should I put my script so that I can run it by a direct command?

Where can (should) I put my (bash) script so that it can be used (forever) by terminal or by a direct command: Alt+F2? I know there is /usr/bin and /sbin & /bindirectories but when should I use ...
1
vote
1answer
106 views

Problem with bash script not verifying pid file

The reason I'm doing this script is because I want to deamonize supervisord, right now I'm in a cloud host in which I don't have access to the /etc or the sudo command, this script is my best attempt ...
1
vote
1answer
24 views

Turn off colour while using script(1)

Is there a way to turn off colour while using script(1)? My script file is being filled with unnecessary information regarding colours from commands such as ls. This information is only visible when ...
0
votes
1answer
30 views

Shell script backup routers

Below is a script I've wrote to backup my routers and adsl modem, Any ideas to compact this script in less lines? Each router have a different kind of structure as you can see. #!/bin/sh ...
5
votes
4answers
805 views

How to know if the running platform is Ubuntu or CentOS with help of a Bash script?

I know the commands to check the name of the Linux machine running on my machine. For example: Ubuntu cat /etc/version CentOS cat /etc/issue How do I get the output from the terminal and ...
-4
votes
2answers
2k views

Whatsapp Help for Ubuntu 14.04! [duplicate]

Hey i have found a way to use Whatsapp on ubuntu using Pidgin! But i don't understand everything on the site... Can someone help me? I have completed the pidgin installation and whatsapp plugin. Now ...
1
vote
1answer
127 views

Bash script doesn't execute command from PATH

I have this simple script: #!/bin/bash echo ${HADOOP_HOME} $(hadoop fs -ls) The output is: /opt/hadoop-0.20.2-cdh3u2 ./hello.sh: line 3: Found: command not found So bash definitely sees ...
2
votes
1answer
142 views

How do I pass complicated shell commands over SSH to be executed remotely? Mine throw syntax errors or get interpreted locally!

I have a command like this which tells me if a system has a disk that's getting full (>=70% full): if [[ -n df -PTh|column -t|awk '{print $6 $7}'|awk -F"%" '{printf "%-9s %-5s\n",$1,$2}'|grep -v -e ...
1
vote
1answer
196 views

GUI toggle key for wifi hotspot(on/off)

I want to create a GUI widget like on/off toggle for running a set of commands. For example, to turn wifi hotspot on and off using ap-hotspot start/stop. Anybody help me...
4
votes
3answers
98 views

How to check the number of fields given to the `read` command?

I have a quick question relating to $# in the shell scripts. So, I can use $# at the command line to check the number of a shell script arguments given by the user. Example: # ./shellScript varONE ...
1
vote
2answers
135 views

Move images from sub-folders into new sub-folders

I have a folder composed of M several sub-folders, each of them containing some text files and N images (*.png) This is what the tree looks like: /parent/ /sub-folder1/ /data1.dat /data2.dat ...
1
vote
2answers
87 views

lscpu output differs when called indirectly?

I use lscpu | grep 'MHz' to get my clock speed. I am getting different results based on the method I am calling this command. Method 1: typing it in the terminal CPU MHz: 1200.000 Method 2: ...
1
vote
1answer
78 views

zip I/O error: Protocol error in bash script

so here's the script that i am trying to get it work: #!/bin/bash filePath="$1" fileName="$( basename "$filePath" )" backupDir="/my/backup/dir/${fileName}-backups/" dateTime=$( date ...
0
votes
2answers
72 views

How to edit a specific line of textfile in terminal with a script?

I need to change a .config text file every time the program doesn't work as I want it to. I want to be able to do it in terminal preferably with an alias and with the following logic: alias ...