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

Merge only new entries from one xml file to another

I have 2 xml files. The 2nd file has some new entries including same entries as that of the 1st file. Examples of the 2 files are given below. File 1 <SERVERNAME_ONE> ...
2
votes
0answers
59 views

Mount USB-Device (Printer) per Script on Ubuntu 14.04 Virtual Box 4.33

We have ubuntu 14.04 with Windows7 on the Virtual Box 4.33 running. As the USB-Printer is mounted at the host or the guest and there seems to be no solution to make it on both available, now my ...
2
votes
0answers
186 views

udev rule script “xinput --list” differs in terminal versus log

I'm trying to automate a Huion tablet calibration without much success. I have this output from xinput --list in a normal terminal: ⎡ Virtual core pointer id=2 [master ...
2
votes
0answers
67 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
13 views

Detecting new USB devices with bash?

I'm writing a bash script that needs to detect when a usb storage device is inserted and assign it to a variable that would otherwise, typically look something like: usb=/dev/sdb. I have a few ...
1
vote
0answers
40 views

Colon(:) operator in Unix shell

As far as colon is concerned i understand that is is used in certain situations as a null and as a parameter of expansion for substring, but can someone explain me this: do_qc: $(STAGE1_OUT_FILES) ...
1
vote
0answers
69 views

Get filename from a wget --content-disposition

Inside of a bash script I am dynamically downloading a file and so I use wget --content-disposition to ensure the file names are correct, but how would I go about retrieving the name of the file wget ...
1
vote
0answers
528 views

Can ffmpeg be paused while recording, and then resume?

I want to record an FM radio station that provides an internet stream. I've worked out the command to record this, and I'm happy with the results. However, once in awhile I will start the command and ...
1
vote
0answers
85 views

Want to send automatic mails from email server, That To addres has to read from email that i received.?

I want to send multiple mail automatically. I will receive mail as FROM: abc@domain1.com TO: 123@domain2.com BODY: mail contains (username@domain3.com) What I want to is take the ...
1
vote
0answers
93 views

Check for a failed copy with scp

Is it possible in my code to verify if the file is well copied or not ? ssh -t root@$machine -x "sshpass -p 'ubuntu' scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null /home/MyFile.txt ...
1
vote
0answers
25 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
156 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
113 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
262 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
37 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
2k 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
27 views

Shell script - Unable to copy file from one older to another

I need to copy the files from one folder to another, here source and destination information are in the text file. File content: resconfig.txt cp -f /var/lib/jenkins/jobs/Android\ Gradle\ test\ ...
0
votes
0answers
31 views

PowerShell Script is not digitally signed

I am trying to call a Powershell script from another Powershell script. When I try to execute the script, I receive to following error message: After researching the error on Google, I entered the ...
0
votes
0answers
22 views

Bash to dos conversion trouble windows path cygwin

I am having a problem with this script that is run through cygwin using a bash script. I need to run this script using a direct network path which is shown in the second snippet of code. #!/bin/sh -p ...
0
votes
0answers
11 views

Automate creation of content and sending mails from template and list of required variables

I have a list of so many users with their email ids Names Mohit Shrivastava Axyee Jackson ... Corresponding email ids mohitemail@domain.com axyee@domain.com ... I want to send all of them ...
0
votes
0answers
27 views

Sed command to replace NUL character in file

I am using the command sed -i 's/\o000//g' filename or sed -i 's/\x0//g' filename to remove the NUL character but the command works fine in DEV environment but doesnt work in UAT. OS and sed version ...
0
votes
0answers
17 views

Shell Scripting - Mac - Emailing

I'm just messing around with shell scripting after doing some in the past, and I have figured out how to Email myself from writing a script by using: mail -s 'Backup status' ...
0
votes
0answers
25 views

How can I disable/enable multiple hardware components with a single command?

I am a web developer/designer during the day, but at night I play DJ gigs. For music, I need several hardware components disabled. Then, after the gig, I reenable all of the hardware. Each of these ...
0
votes
0answers
23 views

Triplicate entries of a column

I have a data column with over 2000 entries... MV1 BNV CMG IKN ... ... I want to triplicate each entry in the column format. Result should be; MV1 MV1 MV1 ...
0
votes
0answers
106 views

replacing special characters without using escape sequence in unix file

I am trying to replace a string with special characters like " &,*,@" etc. This should be done without using escape sequence. I am using sed but it is not working without escape sequence. I am in ...
0
votes
0answers
32 views

I want to run a script that will disable my touchpad

I want run a script that will disable my touchpad and it will run every minute. 1. My script is: if [ `lsusb | wc -w` == '76' ] then `/usr/bin/xinput set-prop 16 "Device Enabled" 0` else ...
0
votes
0answers
25 views

how does ' =~ ' functions in shell scripting?

I want to understand what is the use of =~ regex function? Both the below mention scripts does the same thing so under what condition do we use [[ and ~. 1. x="abc" y="abc" [[ $x =~ $y ]] ...
0
votes
0answers
11 views

Reloading tab completion in postinst script

I'm distributing a .deb that (among other things) installs a file to /etc/bash_completion.d/example for tab completion. The file gets installed correctly, but the tab completion is not immediately ...
0
votes
0answers
53 views

Linux: Delete all but x files?

I have a series of files with different IDs: File_ID1_1 File_ID1_2 File_ID1_3 File_ID1_4 File_ID1_5 File_ID1_6 File_ID2_1 File_ID2_2 File_ID3_1 File_ID3_2 File_ID3_3 For every ID there is a defined ...
0
votes
0answers
59 views

Removing directories using bash script

I have a bash script which I want to delete 5-day-old directories with a name format such as 01-Aug-2015: find /usr/backup/mysql/$date -type d -mtime +5 -exec rm -rf {} \; This is not working for ...
0
votes
0answers
75 views

MySQL Workbench - Add Connection from command-line

I'm writing a shell script to auto-provision a development environment for new employees. The OS is Linux Mint 17 (Qiana) and the idea is to run the script and at the end have a fully configured ...
0
votes
0answers
110 views

Script to open multiple gnome-terminal tabs, each running their own command?

I am currently developing a plugin for Minecraft. My setup consists of five terminal tabs, which I have to recreate every time I log in. I need to cd to the particular directory, then run the ...
0
votes
0answers
21 views

Where to put a configuration file with password/acess token on OSX?

Where to put a configuration file with password/acess token on OSX without versioning on a dotfiles public? Example dotfiles: https://github.com/alexandref93/dotfiles ...
0
votes
0answers
36 views

Staret managed server using Jenkins

I am trying to start web-logic managed server from Linux system. for that I have one shell script start_wls_managed4_btwnpmd01.sh with following code. ...
0
votes
0answers
188 views

Don't interrupt script in sh (“try-finally” for sh scripts)

I'm trying to make a simple script to wrap a command in such a way that it runs with a swapped screen. The main target is top but I wanted it to be a general wrapper. I got it running fine with bash ...
0
votes
0answers
139 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
24 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
84 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
28 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
109 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
58 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
77 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
733 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
26 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
89 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
294 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
170 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
338 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
330 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 ...
-1
votes
0answers
13 views

Search content of odf (odt|ots|odp) documents from command line

I want to search the content of some odf document (Libre Office document) from command line. I want something like: odfgrep <search-pattern> <file-name> I found something of interest ...