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

learn more… | top users | synonyms (1)

2
votes
1answer
301 views

Running commands and shell scripts in Ubuntu

I'm trying to run a shell script in Ubuntu to flash my Firefox OS phone. I've downloaded and unzipped the new version. I've launched the shell and navigated to the directory where the .sh file is. ...
2
votes
1answer
202 views

Passing Return Key via Shell Script

I'm using phpseclib to run a shell script on my server at a given interval. That script involves using nohup. For whatever reason, if there isn't a user ready to send SIGINT or a return to nohup once ...
2
votes
1answer
65 views

Automating the installation using SSH

I am running a bash script from a remote host to run a binary file which installs 64 bit JDK 6 update 29 on multiple VMs across the Environment. It is installing the file but, at the last line i have ...
1
vote
1answer
67 views

I want to read a value from a text file and compare it with a number

I am using windows powershell. I want to retrieve a number which is stored in a text file and compare it with some other number using a shell script. If I use $x=$(cat value.txt) it says "command not ...
1
vote
1answer
61 views

what does =~ in linux means used in if condition to compare values

Actually tomcat/conf/catalina.properties file contains line shared.loader=/usr/share/sfit/conf I mean value has some path. so using shell script we are updating shared.loader values in file. And also ...
1
vote
1answer
304 views

Unable to run shel scrip file, permission denied

I am having shell script file, basically a setup file for installing xilinx tools. The name of the file is xsetup Also i checked its permission after doing this chmod 777 xsetup In fact the ...
1
vote
1answer
458 views

How do I create a one time use startup script on Linux - Centos 6.x

I want to set a script that will only run one time on a Centos 6.x box and then never run again, since it's going to set some system options based on hardware and then it's all set.
1
vote
1answer
160 views

xargs in shell script

I want to group jpeg images by odd number and even number. So I did like following: $ mkdir odd $ mkdir even $ find . -regextype posix-egrep -regex ".*[13579].jpg$" -print0 | xargs -i -0 mv {} odd/ $ ...
1
vote
1answer
239 views

run a shell script on terminal if terminal is idle for few minutes in linux

i can get terminal idle time by w command as follows $ w 14:37:58 up 2 days, 20:16, 2 users, load average: 0.12, 0.16, 0.14 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT ...
1
vote
1answer
28 views

command at boot, before another script

This should be an easy question, but as a solaris novice, I'm stuck. I have to launch a change MAC address command at boot (i.e. ifconfig bge0 ether). If I do this at terminal, everything goes smooth. ...
1
vote
1answer
270 views

Applescript to shell script watch folder

I am trying to setup a watch folder so that when a file is added to a folder, I can run a shell script...for this purpose I made a simple test but cannot make it work... Here is my applescript on ...
1
vote
1answer
172 views

how to remove “downloading” or 0% complete torrents in rtorrent using bash script?

I have 10K torrents and 7K of them are going too slow. I would like to remove them but the rutorrent and rtorrent interface is unusably slow. I noticed that the info about rtorrent is kept in .session ...
1
vote
1answer
110 views

Hard linking directory structure somewhere else

I have one directory where files appear in. I want to run a script regulary that finds all files in that directory that have only one link to them, and hard link them in another directory. However, I ...
1
vote
1answer
65 views

How to put a Number in to a plist with bash

I'm trying to update my com.apple.background.plist. It works but the "ChangeTime" needs to be a Number/Integer in order to work. I tried to place a -int into the code but it gives an error. ...
1
vote
1answer
583 views

How to get the CPU and memory usage per session Linux

I have to do a script in bash to calculate the percentage of CPU and memory usage per session in Linux. What standard UNIX tools can I use in my script to get this information? I have this ...
1
vote
1answer
336 views

script for auto adding routing table entries

I work for a company that has a lot of remote agents that use mac's. Before we will move them to mountain lion, we had to address the VPN issues we were having. We deal with a lot live media and ...
1
vote
0answers
36 views

Is there any way to see make file with all variables substituted

I have huge long makefile written by some other guy, where all coomands contain variables. In order to decode what this command is doing i have look around what that variable is and its taking too ...
1
vote
0answers
65 views

allowing timeouts for commands that have no timeout option, where `IFS=$'\n'`

In the lines below, which I added to my copy of Apple's sysdiagnose script: wherever a timeout is already scripted, it is effective I must add timeouts in two areas, but I don't know how to do so. ...
1
vote
0answers
171 views

Run program on kde logout

I have created a backup script and I want to run it in a terminal window (to view the progress) when I logout from kde. I used the autostart feature and that works but I'm unable to show a terminal ...
1
vote
0answers
36 views

Scripting the way firefox starts

In Windows 7, is there any way to script the websites that are opened whenever I open Firefox based on certain criteria? For example, if it's Thursday, load a certain website as my homepage, but only ...
1
vote
0answers
64 views

Unable to connect to Amazon EC2 without using PPK file

I have a build job which runs on Hudson and synchronizes content from an Amazon AWS server. This is written in shell I have a PPK file given to me which can establish the connectivity Here is the ...
1
vote
0answers
1k views

Macintosh OS X Logout Script

I am working on a project where I need to implement a logout script on some Macintosh computers. I have read the following Create a logoff script/task for Mac OS X article and found that while it is ...
0
votes
0answers
8 views

Automator shell script that triggers opening gui apps

So I have a service, I want it to be running on startup. I thought I could use Automator. The problem is - that thing may need to open gui app, and that of course doesn't work. I'm running Vrome ...
0
votes
0answers
20 views

how to detect availability of GUI

For Linux: I have a text mode installation (bash) script and a graphical mode setup program (a Free Pascal binary). I'd like to run the graphical setup when a GUI is available. How do I detect which ...
0
votes
0answers
26 views

Rsync and find filter

I'm trying to use rsync in combination with find to restrict the number of files to copy. My code looks like this: for NODE in $NODES; do echo Processing $NODE ........ for LOGDIR in ...
0
votes
0answers
41 views

Windows 8.1 does not remember credentials of network location

I have a bunch of computers running Windows 8,1 connected by LAN to one central server that runs Server 2012 R2. I have all my scripts stored on the server, so to be able to run them from the other ...
0
votes
0answers
21 views

How to manualy spawn a client in a specific tag in Awesome?

I already have automatic tag assignation for clients using rules, but sometimes I need to spawn a client in a specific tag. For example, I usualy want my browser (dwb) in tag 2 using the following ...
0
votes
0answers
24 views

Distributing master key in hadoop

For the master node passwordless-ly ssh into the slaves, the master needs to distribute its ssh keys to the slaves. Copying keys using ssh-copy-id asks for the user password. If there are hundreds of ...
0
votes
0answers
44 views

Wrong exit status from expect script

I developed the TELNET_TEST.expect (expect script ) in order to test TELENT connection on remote machine this script perform telnet on target machine wait for login and send password and make exit ...
0
votes
0answers
26 views

Bash script for repeated execution of benchmark

I'm working on a project involved with cloud instance performance. Currently running UnixBench on EC2 instances. For comparison purposes I require a benchmark to be run constantly on one instance. By ...
0
votes
0answers
21 views

I need a dynamic script for changing Host IPs depending on computer name that I can shoot over the network

Does anyone know how to make a Batch/Script, that I can modify, for looking up the host computer name and build the IP and gateway off of it. we have a simple setup of computer name refers to ...
0
votes
0answers
11 views

unable to terminate the program via using function in shell

I have two files 1.sh and 2.sh below is the code of both files. 2.sh is main file which is executing and 1.sh is used for defining the functions. 1.sh function logging_function() { STATUS=$1 ...
0
votes
0answers
16 views

Determine missing files after XML to Json conversion

I want to do some analyses on this files, using a big data approach. After converting my entire Batch of Files from XML to JSON (Over 100k Files, divided in 2 Folders) I realized that in the first ...
0
votes
0answers
46 views

Tools to create a 'GitHub' style index page for files/folder on a fileserver?

My workplace doesn't have a document management system. People just throw files on a shared fileserver, where search doesn't really work. Trying to find information/files for a particular project by ...
0
votes
0answers
14 views

(MAC) Change location of shell script's shell

When I make an executable shell script ("http://chimpy.wordpress.com/2010/08/29/mac-os-x-shortcut-link-to-python-script/", but without the python part), It's pointer location (The location commands ...
0
votes
0answers
27 views

Start program from shellscript in background then bring back to foreground later

I'm trying to make a shell script that does the following: Start program ~/x While x is running execute some commands, for example: echo "blabla" >> ~/blabla.txt After the execution of those ...
0
votes
0answers
18 views

Scriptable resize (enlargement) of partition inside LV to end of LV?

I'm trying to automate some KVM installs, and I need to fit an existing image onto a newly created LV. The image is partitioned minimally, so I need a way to enlarge the first partition from the ...
0
votes
0answers
45 views

Implement Roll-backing in bash script

I have implemented an Ubuntu package in which bash scripts are using. I followed these for making packages in Ubuntu. ...
0
votes
0answers
94 views

Chrome OS sudo startunity app

I am running crouton unity on a Samsung chrome-book. How do i automate a shell script to start unity into a chrome OS app that I can place on the chrome shelf next to the other chrome apps? i want ...
0
votes
0answers
48 views

Batch Script For Replacing Files

I'm looking for a batch script to read files from a directory and replace them with a zero sized file, if it can detect some special words and then do this, it would be wonderful. For example think ...
0
votes
0answers
53 views

Energy volume calculation script

Hi I want to write a shell script for energy and volume calculations for different lattice constants. For convergence of energy,using siesta. can anyone help I tried this work manually but now want to ...
0
votes
0answers
195 views

Crontab command set not working

I'm trying to set up crontab to run a shell script, but for some reason, the script doesn't get executed. I'm on system with OS X 10.8.5. crontab file 0 12 * * 1 /absolute/path/to/myscript.sh 0 15 * ...
0
votes
0answers
132 views

USB dongle for Steam Box (Debian, init, gdm, and runlevels)

I would like use my desktop computer as a normal desktop computer at one time, and a "Steam Box" another. By default I want the computer to boot as a normal desktop; but I want it to be able to boot ...
0
votes
0answers
270 views

Rotate Outgoing Ip in Postfix, script not working

I've found what it seems to be a nice piece of code meant to rotate postfix IP but I really can't get it to work. when I run it I get this error: rotate_postfix_ip.sh: 2: Syntax error: "(" unexpected ...
0
votes
0answers
25 views

Different behavior from ubuntu server and ubuntu client on windows

#!/bin/bash # Reading cat /home/radiare/Desktop/first.txt | while read LINE do echo $LINE if [ "$LINE" == "false" ]; then echo "Inside first loop" break fi done echo "second file read started" cat ...
0
votes
0answers
79 views

scheduling various things and balancing bandwidth while using torrent and uploading

I have approximately 200 files to be downloaded via BitTorrent, these files can be from 200mb to 4.8 GB on the same time I want to take backup of some already existing pdfs in my home directory, ...
0
votes
0answers
151 views

Workaround for ENOTTY while running a c process from script?

What's the issue? Getting a ENOTTY error on a function call tcgetattr() when the process is invoked from a script. The error comes only when ran from the script. If it is run from an interactive ...
0
votes
0answers
148 views

rsync shell script

Need some hints on my first shell-script using rsync. I use rsync, because I had some trouble with a graphical Backup that ran twice and now I want this example as shown below to work on two external ...
0
votes
0answers
334 views

Fedora 16 seems to need a different auto logon auto start shell script?

Im looking for auto root login shell then when logged in auto start a script. Looks like Fedora 16 use very different approach than other Fedoras.
0
votes
0answers
185 views

CScript Terminates before completing task

I am using the below with mods but ziping several Gb of info the last command is Wscript.sleep 2000. I have extended this to 20,000 and 200,000 but I use the script vor various diferent sizes. Is ...