while executes commands as long as a test succeeds.
read will not succeed at EOF from taskfile.txt and the loop will stop.
if the last line is not in fact a line (it doesn't end with \n), then you will reach EOF before read reaches the delimiter. An example:
Text files by definition should end with a newline, but if this is the problem you need to work around you can try entering your loop again with a test like this:
Hi everyone,
Ive got a quick question about the feasibility and any suggestions for a shell script. I can use sh or ksh, doesnt matter. Basically, Ive got an output file from a db2 command that looks like so:
SCHEMA NAME CARD LEAF ELEAF LVLS ISIZE NDEL KEYS F4 F5 ... (3 Replies)
Hi intelligent beings,
I am trying to write a script that
1. Accepts the following arguments:
store_number
div_number
user_id
div_code
2. Will read from a configuration file to get the Database
3. Use the div_code to determine which value to retrieve from the configuration file
... (1 Reply)
Hi,
Lets say I have a script "ss" which does this
read abc
echo $abc
read pqr
echo $pqr
Now if I want to pass and argument to only "abc" how do I do it.
If I do
echo "somevalue" | ss, it does not prompt for pqr and its value comes out as blank.
Any help is appreciated
Thanks
P (6 Replies)
Hi all,
I am new to shell scripting.
I have dbf file and I need to convert it into csv file.
OR, can i read the fields from a .dbf file and OR seprate the records in dbf file and put into .csv or txt.
Actually in the .dbf files I am getting , the numbers of fields may vary in very record and... (6 Replies)
Hi I am trying to write a shell script that is reading all the scripts in the current directory (currently 5) and is allowing me to run the scripts that is in the directory.
I want that this scripts asks te user to execute 1 of the listed scripts.
I have 4 sample scripts in the directory:... (8 Replies)
hi all,
Currently in my system a user's password expires after 90 days and the last passsword change time is stored in an attribute pwdchange date. i need a linux script that read this attribute and add 89 days and send an email that the user password is expiring the next day.
i can store... (1 Reply)
I was analyzing the Disk read using hdparm utility.
This is what i got as a result.
# hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 108 MB in 3.04 seconds = 35.51 MB/sec
# hdparm -T /dev/sda
/dev/sda:
Timing cached reads: 3496 MB in 1.99 seconds = 1756.56 MB/sec... (1 Reply)
Hi
I am looking for an easy way to lock game mode (0) for everyone included op on a Minecraft server. It can be a script that every time a player changes game to 1 the script changes back to 0. What the player writes is visible in the java console. I am not good at script programming and my... (0 Replies)
cleanwork /saswork removes sas orphanded processes in the saswork directory. Subdirectories under sasem are sas94, sas92 and sasworks .
I am getting the following error messages:
1.
'/usr/bin/sudo -S apt-get update <~/opt/SiM/pos/ps/db_auth.cfg... (4 Replies)
Hello Unix Shell Script Experts,
I have a script that would mask the columns in .csv file or .txt file.
First the script will untar the .zip files from Archive folder and processes into work folder and finally pushes the masked .csv files into Feed folder.
Two parameters are passed
... (5 Replies)
Discussion started by: Mahesh G
5 Replies
LEARN ABOUT MINIX
safenet
SAFENET(8) NUT Manual SAFENET(8)NAME
safenet - Driver for SafeNet compatible UPS equipment
NOTE
This man page only documents the hardware-specific features of the safenet driver. For information about the core driver, see nutupsdrv(8).
SUPPORTED HARDWARE
This driver supports UPS equipment which can be controlled via SafeNet v1.0 for Windows (serial interface only).
EXTRA ARGUMENTS
This driver supports the following optional settings in the ups.conf(5) file:
manufacturer=value
Autodetection of this parameter is not possible yet (and it probably never will be). Therefore, this user-defined string accepts any
name. The default is unknown.
modelname=value
Like manufacturer above. The default is unknown.
serialnumber=value
Like manufacturer above. The default is unknown.
ondelay=value
Time to wait before switching on the UPS (minutes). Defaults to 1 minute.
offdelay=value
Time to wait before shutting down the UPS (seconds). Defaults to 30 seconds.
UPSCMD
This driver supports some instant commands (see upscmd(8)):
test.battery.start
Start UPS self test
test.battery.stop
Cancel UPS self test
test.failure.start
Start simulated power failure
test.failure.stop
Cancel simulated power failure
beeper.enable
Enable the UPS beeper
beeper.mute
Temporarily mute the UPS beeper
beeper.toggle
Toggle the UPS beeper
shutdown.return
Turn off the load and wait for the power to return. Uses the timer defined by offdelay.
shutdown.reboot
Turn off the load and return. Uses the timers defined by offdelay and ondelay.
KNOWN PROBLEMS
If you run the shutdown.return command with mains present, the output may stay on or switch off and not back on again. The shutdown.reboot
command will unconditionally switch on the load again (with or without mains present).
If the driver is called with the -k option (or through upsdrvctl shutdown) it tries to detect which command should be used in an attempt to
stay off until mains is present again or to cycle the output if the power returned in the mean time. This isn't bullet-proof, and you
should be prepared that the power will either not be shutdown, or that it doesn't return when the power comes back.
AUTHOR
Arjen de Korte <adkorte-guest at alioth.debian.org>
SEE ALSO
The core driver:
nutupsdrv(8)
Internet resources:
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
Network UPS Tools 05/21/2012 SAFENET(8)