Rather than wrestling with the shell to do this - make it easy on yourself and use Perl - for example, to only print the line if the user enters a 1....
Cheers
ZB
Hi all
Does anyone have a script that will allow me to stop inside a while read loop.
I want to pause the loop until a enter is pressed.
e.g.
While read line
do
echo something
if LINECOUNT > 40
then
read ENTER?"PRESS ENTER TO CONT..."
... (3 Replies)
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
Hi all
Sorry for the basic question, but i am writing a shell script to get around a slightly flaky binary that ships with one of our servers. This particular utility randomly generates the correct information and could work first time or may work on the 12th or 100th attempt etc !.... (4 Replies)
Hi,
I am reading file records inside a while loop,
and want to update the record when certain condition is met.
How can I update a file while being read?
I want to avoid using temporary files, copy, rename, ...
while IFS=',' read -r f1 f2
do
function(f1,f2)
if
then
<add... (1 Reply)
Hello,
I have a set of files Xfile0001 - Xfile0021, and the content of this files (one at a time) needs to be printed between some line (lines start with word "Generated") that I am extracting from another file called file7.txt and all the output goes into output.txt. First I tried creating a for... (5 Replies)
I'm taking a unix class and need to countdown to 0 from whatever number the user inputs. I know how to do this with a while or until loop but using the for loop is throwing me off....
I know I can use an if-then statement in my for loop but can I include a while loop in my for loop? (3 Replies)
Hi there guys!
I was trying to do:
while read line; do
if ; then
read -p "Press Enter to continue..."
cont=0
fi
echo $line
let cont++
done < file.txt
However, I have read that the read -p would not work in a while loop...
I was wondering if there is any other way to... (2 Replies)
Hi,
This query is a part of a much more lengthy script.
I wish to look for all the files in a folder named "data" which in this case has two files i.e. plan.war and agent.properties. For all the files found under data I wish to ask the user as to where they wish copy the files to.
Below,... (14 Replies)
Hi everybody,
I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o
My code:
#!/bin/sh
set -e
set -u
export IFS=
optl="Optl"
LOCSTORCLI="/opt/lsi/storcli/storcli"
($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Discussion started by: Subsonic66
5 Replies
LEARN ABOUT DEBIAN
config::model::models::lcdd::cfontzpacket
Config::Model::models::LCDd::CFontzPacket(3pm) User Contributed Perl Documentation Config::Model::models::LCDd::CFontzPacket(3pm)NAME
Config::Model::models::LCDd::CFontzPacket - Configuration class LCDd::CFontzPacket
VERSION
version 2.021
DESCRIPTION
Configuration classes used by Config::Model
generated from LCDd.conf
Elements
Model
Select the LCD model Optional. Type enum. choice: '533', '631', '633', '635'. upstream_default: '633'.
Device
Select the output device to use Optional. Type uniline. upstream_default: '/dev/lcd'.
Contrast
Set the initial contrast Optional. Type integer. upstream_default: '560'.
Brightness
Set the initial brightness Optional. Type integer. upstream_default: '1000'.
OffBrightness
Set the initial off-brightness This value is used when the display is normally switched off in case LCDd is inactive. Optional. Type
integer. upstream_default: '0'.
Reboot
Reinitialize the LCD's BIOS on driver start. Optional. Type enum. choice: 'yes', 'no'. upstream_default: 'no'.
USB
Enable the USB flag if the device is connected to an USB port. For serial ports leave it disabled. Optional. Type enum. choice: 'yes',
'no'. upstream_default: 'no'.
OldFirmware
Very old 633 firmware versions do not support partial screen updates using 'Send Data to LCD' command(31). For those devices it may be
necessary to enable this flag. Optional. Type enum. choice: 'yes', 'no'. upstream_default: 'no'.
Size
Override the LCD size known for the selected model. Usually setting this value should not be necessary.Optional. Type uniline. default:
'20x4'.
Speed
Override the default communication speed known for the selected model. Default value depends on model Optional. Type enum. choice:
'19200', '115200'.
SEE ALSO
o cme
perl v5.14.2 2012-11-09 Config::Model::models::LCDd::CFontzPacket(3pm)