A shell script is a script written for the shell, or command line interpreter, of an operating system.

learn more… | top users | synonyms (1)

0
votes
1answer
47 views

Shell script exits without evaluating if condition

I have the following commands in my shell script #This line basically builds a source library $BUILD_CMD $CONFIGFILES/$1.prj $BUILDFILESPATH if [ $? -eq 0 ];then echo "Build success\n" #do ...
0
votes
2answers
23 views

Trouble Creating a simple script

I just wanted to create a script that opens Teamspeak. I was on here before about that, but I thought it would be more simple by just creating a script. I wanted to make a script to launch the script ...
1
vote
1answer
27 views

Writing a script to rsync all directories

I have a huge set of backup files, each containing a directory of Videos. Each video directory is slightly different. I would like to merge these into a single directory to conserve, as I don't ...
1
vote
2answers
54 views

Automating rsync commands

I currently have too many rsync commands that I run on a day to day basis. Could someone be kind enough to let me know how I can automate these commands? I am new to Linux so a little bit of ...
0
votes
0answers
28 views

Scanning a folder for new files, and then running them trough cuckoo

I want to create a folder, where I throw in all the malwares I discover. In that folder, I want to run a script that recognize a new file (the malware) and when he discovers a new file, he will submit ...
0
votes
1answer
47 views

Term Enviroment variable not set

This is the code that I want to execute through motd: #!/bin/bash IP=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'` #clear echo -e "Welcome to \e[0;32mDMS ...
-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
53 views

return value from awk

This is mybashfile.sh file . . . awk -f myawkfile.awk mytracefile.tr . . . Now I want to return one parameter from myawkfile.awk to the current mybashfile.sh. Is there any way to return a value ...
28
votes
3answers
1k views

Should I save my scripts with the .sh extension?

I have some functional scripts and I want to copy to /usr/bin I want to use them as normal terminal commands. Is it a good practice to use them with the .sh extension or can I save them without ...
2
votes
2answers
237 views

Ubuntu 14.04 not running Bash scripts in /etc/cron.daily

I have a few scripts (that currently run in a CentOS system) I have moved to a new Ubuntu 14.04 system. These scripts are in the /etc/cron.daily to run once a day. These scripts are to run at the ...
0
votes
1answer
60 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
3answers
82 views

How to run a Phantomjs server with an upstart script?

I have phantomjs installed and I want to run a phantom server whenever the (Ubuntu) server starts. I am currently working locally on Ubuntu 14.04, and the server this will be deployed to is also ...
0
votes
0answers
51 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 ...
0
votes
0answers
46 views

GRUB2 /etc/grub.d/ 40_custom multi-boot

I am adding GoBoLinux to Windows Vista and Ubuntu 12.04 with GRUB2 on the MBR but I am not clear on the script or how to devise a script to replace 40_Custom. Loading the GoBo GRUB to it's own root ...
1
vote
2answers
42 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
68 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
21 views

Script for changing access rights of multiple files and directories?

I want to create a script that changes the access rights for all files and folders in a specific directory tree. All users should have read and write access for all files and directories. Does anyone ...
0
votes
1answer
25 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 ...
2
votes
2answers
109 views

Opening multiple terminal tabs and running command

I need to open multiple terminal tabs, give them titles, go to a directory, and make each tab run a command. I am new to Linux and shell scripting, after searching online and checking some solutions, ...
0
votes
2answers
36 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
57 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 ...
3
votes
3answers
249 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
2answers
43 views

Bash script to enable / disable SSH

Im running ubuntu 14.04 LTS (no GUI) and im looking to write a bash script that does the following: Check to see if the ssh service is enabled or disabled If enabled, then disable, if ...
1
vote
1answer
40 views

How to Start Program After SSHD is Up and Running

I'm working on a project that requires I start a GUI before the login prompt. I had this working under 12.10, but today I migrated to 14.04 and it's breaking stuff. At this point I've configured Grub ...
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
1answer
48 views

Which arguments are passed to init scripts during shutdown

I am currently looking at the startup and shutdown procedures for ubunut precise pangolin. As far as I understand at shutdown the system switches to runlevel 0 and all scripts with K* are executed ...
0
votes
4answers
53 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
55 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 ...
0
votes
1answer
34 views

Script To Logout Root and Login User

I was wondering if there was a way to make a script that logouts of root or takes the automatic root login and logs in a user. This is for security reason so that the user cannot change important ...
5
votes
5answers
304 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
104 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 ...
1
vote
2answers
67 views

Specify password for sudo in script

I am making a script that will update my system (and do some other things, but that doesn't matter). I want the script to run sudo apt-get update and sudo apt-get dist-upgrade --yes automatically. I ...
0
votes
1answer
77 views

access to column in python like awk [closed]

This is my data file: Iam python newbie If I use awk to access columns element, that is easy just by $1. how can I access this columns element on python?
2
votes
1answer
81 views

Script adding launchers to the top gnome panel

For a large number of machines running 12.04 with gnome-classic. I'd like to script adding launchers to the top left of the gnome panel. I know how to add them manually but this is a tedious ...
0
votes
1answer
42 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 ...
0
votes
2answers
33 views

Prevent parameter expansion in shell script

Folks, I often have to do a recursive search in files. Tired of typing the whole "find/grep" combination all the time, I just created a script with the following line: find . -name $1 -exec grep $2 ...
1
vote
1answer
44 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, ...
0
votes
1answer
36 views

In this script, ~ is /root/. How to be in /home/name-of-the-user/?

#!/bin/bash #become root UID=$(id -u) if [ x$UID != x0 ] then printf -v cmd_str '%q ' "$0" "$@" exec sudo su -c "$cmd_str" fi mkdir ~/.D3GO/; cp -a `pwd`/viewright_backup/. ~/.D3GO/; ...
0
votes
2answers
22 views

How to make a script that will make another script in the same folder executable?

How to make a script that will make another script in the same folder executable? I don't want to worry about path since it will be in the same directory. So it should be something like(i'm trying to ...
1
vote
1answer
28 views

Launch app with absolute path does not woks

I'm quite new in Linux environments, but for this one, I need help on bash. I'm on Kubuntu 14.04 x64 I have an embedded JRE for my business application , placed like this: app_root/run.sh (my ...
2
votes
1answer
97 views

How to write a script to run different application

I am very new to linux platform. Looking for a script file to call different application start up file located in different location and needs to be run in different terminals. For example : i ...
0
votes
1answer
50 views

How to open a bash script in Terminator using a command line?

so basically I have a program called Terminator and I want to open a .sh script, however, I don't run to run it as root, I basically want to have Terminator run the script, using another command line, ...
1
vote
1answer
67 views

Run the script file after 5 or 10 min after restarting the system

I have created a ruby script file that checks the connection present or not. For example checking port 22 is opened or not. Firstly I tried with cron job as follows @reboot find ...
-1
votes
1answer
63 views

Why can't I update my system via shell script?

I have a very simple script, let's call it update.sh: #!/bin/bash echo "Updating system..." sudo apt-get udpate sudo apt-get udgrade Running this script, throws the following error: me@host $ ...
1
vote
4answers
165 views

How to make Start up script for Making Application run on startup

I have one jar which i need to run on startup and no matter whatever user is logged in and that need to take that user name automatcally here this code can take user name echo $(logname) and this ...
1
vote
2answers
60 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
35 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 ...
2
votes
3answers
52 views

automate multiple file conversions

I need help fixing my script to automate multiple file conversions. I am working on the server and I am trying to find a way to convert files automatically. The conversion needs to be made through ...