Sponsored Content
Top Forums Shell Programming and Scripting Help me streamline this counting part of my script. Post 302170803 by LinuxRacr on Tuesday 26th of February 2008 06:04:39 PM
Old 02-26-2008
Ok, so this is how I ended up using it in my script. Of course I had to change a couple of other things to make it work but it works great!!!

Code:
## Increment the disk counter based on $NUMBER, and output to disks3.txt
> disks3.txt
CURRENT=0
while [ $CURRENT -le $NUMBER ]
   do
         if [ $CURRENT -gt 1 ]
            then
            lv_val=$(printf "%.2d" $CURRENT)
##Capture disk names, all except the first disk in the disk group
            echo ${DISKGROUP}$lv_val >> disks3.txt
         fi
         CURRENT=$(($CURRENT + 1))
done

 

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

counting in shell script

hi i am writing a korn shell script to compile all programs there are arount 2000+ files now i have a script that can compile programs but i want to show status of compilation because to compile all programs it takes around 10-15 mins so how can i display status like it should print no of files... (3 Replies)
Discussion started by: zedex
3 Replies

2. Shell Programming and Scripting

Streamline script to search for numbers in a certain range

Hello all, I need help making a script run faster since I have a huge file to sift through. The file I am running my script on looks like this: 1 -1.9E+001 -1.8E-001 1.5E+001 3.32E+001 2 -1.7E+001 -1.0E-002 1.2E+001 6.37E+001 3 -1.5E+001 -3.8E-006 6.7E+001 4.81E+001 The... (12 Replies)
Discussion started by: butson
12 Replies
DH_INSTALLDEBCONF(1)						     Debhelper						      DH_INSTALLDEBCONF(1)

NAME
dh_installdebconf - install files used by debconf in package build directories SYNOPSIS
dh_installdebconf [debhelperoptions] [-n] [--params] DESCRIPTION
dh_installdebconf is a debhelper program that is responsible for installing files used by debconf into package build directories. It also automatically generates the postrm commands needed to interface with debconf. The commands are added to the maintainer scripts by dh_installdeb. See dh_installdeb(1) for an explanation of how that works. Note that if you use debconf, your package probably needs to depend on it (it will be added to ${misc:Depends} by this program). Note that for your config script to be called by dpkg, your postinst needs to source debconf's confmodule. dh_installdebconf does not install this statement into the postinst automatically as it is too hard to do it right. FILES
debian/package.config This is the debconf config script, and is installed into the DEBIAN directory in the package build directory. Inside the script, the token #DEBHELPER# is replaced with shell script snippets generated by other debhelper commands. debian/package.templates This is the debconf templates file, and is installed into the DEBIAN directory in the package build directory. debian/po/ If this directory is present, this program will automatically use po2debconf(1) to generate merged templates files that include the translations from there. For this to work, your package should build-depend on po-debconf. OPTIONS
-n, --no-scripts Do not modify postrm script. -- params Pass the params to po2debconf. SEE ALSO
debhelper(7) This program is a part of debhelper. AUTHOR
Joey Hess <joeyh@debian.org> 11.1.6ubuntu2 2018-05-10 DH_INSTALLDEBCONF(1)
All times are GMT -4. The time now is 07:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy