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
287 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
197 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
61 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
51 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
221 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
393 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
147 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
219 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
248 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
162 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
106 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
64 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
532 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
326 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
1answer
374 views

How to exclude the hidden directory from the result of find command

I am searching for some directories in find command and if that directory is present then I need to take some action on it. But what is happening is: At some places though the main directories (for ...
0
votes
1answer
17 views

Keep only latest two folders in the directory

I have a directory which has the following folders. Data-2014-07-10-0240 Data-2014-07-10-0340 Data-2014-07-11-1232 Data-2014-07-12-0530 Data-2014-07-13-1210 I want to keep only latest two folders ...
0
votes
1answer
45 views

how to batch change date created to date modified

I have many video files ending with extensions mov, avi, mp4, and mts. I need to change their "date created" to their "date modified value" I tried using the following powerhsell script: ...
0
votes
1answer
31 views

Ignoree a specific file in file count “wc -l”

e.g. I have directory like ABC. And this directory contain following files (it contain number of files i just include 4 fils here) 2014-04-29T06-19-20_17368f93ce.mp4.uploaded ...
0
votes
1answer
36 views

running for loop - but wait for string of words in log file to continue

so far I have this: for each in {01..10} ; do ./sb0$each/tomcat_sb0$each start;done that will start my apps at once, but I want it to wait until it reads one line in a file, what's the easiest way ...
0
votes
1answer
50 views

Unix Scipt Shell: alert on change of specific files

Could any one Help me with the script Im trying to make a script shell that will alerts/email the root if any of those files has been modified and the script has to auto routine , so the script have ...
0
votes
1answer
120 views

Cron unable to run shell script

I have been trying to get a shell script to run for hours using cron to no avail. I am trying to have the following bash script run every minute #!/bin/bash ...
1
vote
0answers
35 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
63 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
164 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
17 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
9 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
12 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
35 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
25 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
16 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
43 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
85 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
181 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
124 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
161 views

How to write array data into plist using shell script?

I have fetched multiple dictionaries from multiple plist. after i saved them in array . now i have to merge or write this array to new plist. Is der any command to do this ? Please find below code ...
0
votes
0answers
246 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
78 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
136 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
146 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
181 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 ...