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
49 views

How to view two dialog boxes on the linux console, running on the same time?

I want to view on the Linux console two dialog windows on the same time. I want a window that views the progress BAR, and the a second tailbox that view the logs are running. The problem is that the ...
2
votes
1answer
111 views

Timer running under bash script in dialog window

The following bash script is an example on how to use the dialog command. This script runs a progress bar (and displays the process upgrade). What is missing in the dialog is a time clock - that ...
2
votes
1answer
60 views

Using bash script to select/view only specific data from logfile

My NAS creates a logfile in the format below: <30>1 2014-07-21T05:02:10+02:00 ABC-NAS qlogd 6432 - - qlogd[6432]: event log: Users: Glacier, Source IP: 127.0.0.1, Computer name: localhost, ...
2
votes
1answer
389 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
216 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
107 views

How to restore “.sh” association in bash?

For some unknown reason I have a Debian 7 VM where .sh files that don't have a shebang line (#!/bin/sh) are no longer associated/executed by bash, ie. under bash, with "test.sh" an executable shell ...
1
vote
1answer
80 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
75 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
466 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
606 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
187 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
0answers
18 views

“Autoscroll” Pdfs one by one from a “play-list”/directory

Is there a way to achieve this: open multiple .pdf from a "playlist"/given directory one by one in the same window, with auto-scrolling enabled? (Explanation: 1st pdf opens- autoscrolls to the end- ...
1
vote
0answers
37 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
119 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 ...
1
vote
0answers
69 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
201 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
9 views

Delete messages in Gmail “All”, “Incoming” or “Sent” folder

I use one Gmail account only for mail relaying from my home server to different accounts, to multiple users. The problem is that there are some thousands of emails on this account in the "Sent" and ...
0
votes
0answers
9 views

how to give username/pass with openvpn shell-script

I'd like to write a little script to connect to an openvpn server from an ubuntu desktop machine. The password for the server changes regularly, so it is not in the config file in /etc/openvpn. I can ...
0
votes
0answers
37 views

Why variables in shell are not inherited by sub-shell now that the sub-shell is implemented by fork?

When running shell command in shell scripts, a sub shell process is generated. Doesn't the process is generated by fork function? Why the variables that are not exported are not inherited? In fork, ...
0
votes
0answers
57 views

ksh script using if break statements

I have a script file that has the server details like set -A SERVERGRPS SERVERS_CA SERVERS_NY set -A CA ca126 ca546 ca 642 set -A NY ny112 ny113 ny114 now I have to write a another script which ...
0
votes
0answers
18 views

Can I Query a Pdf Reader If It's On The Last Page?

I'm writing a wrapper shell-script to do the following: Searches a directory for .pdf/.djv files. makes an ordered "playlist" of files Opens 1st file in a pdf reader. Automatically change to the ...
0
votes
0answers
38 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
23 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
52 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
549 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
35 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
29 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
192 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
43 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
22 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
12 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
22 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
62 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
16 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
33 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
20 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
49 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
57 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
227 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
357 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
82 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
172 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
151 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
335 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
207 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 ...