problem about shell-script-Collection of common programming errors
Mat
shell shell-script sed
For my script I have to read the data from a file. For example I have 2 files: one is a text file, the second is a csv file with 10 columns.What I am trying to do is to read the csv and change the parameters in the first file.Using sed -n to read the data one row at a time and save this in a fileC Using sed “s/&replacefile1param/&readFileC/
jasonwryan
shell shell-script trap
I wrote a shell script run_script.sh, which includes a step which creates an empty file run_script.lck. Everytime the shell script was called by the cronjob, it will check for the existence of run_script.lck. If the lock is presence, it indicates that run_script.sh is already runn
Mikel
bash shell shell-script solaris
I have a script similar following one:#!/usr/bin/shvar=”ABC” if [ $var == “ABC” ] thenecho True elseecho False fiAbove code does not work in Solaris Sparc and Solaris X6
Robert
bash ssh shell-script kvm
I’m trying to run a set of commands on a remote machine, that includes an if statement. I’m using this to shutdown a list of kvm instances. The first line should be fine, but could be prettier, rest needs some help. ssh root@kvmsrv ‘virsh shutdown $host 2> /de
slhck
windows linux bash shell-script text-editing
I’ve this plain text file that I need to be automatically examined and results written in another plain text file. Note that I’ll use plain text and CSV interchangeably, since CSVs are plain text with common separator between data (commas, tabs, etc).Dat
snihalani
shantanuo
angus
angus
bash shell-script getopts
When parsing command line arguments with
Moorage
linux shell-script centos-5
I am getting the databases from mysql and my database name is username_something. I am getting the username an
Originally posted 2013-11-09 22:11:03.