Sponsored Content
Top Forums UNIX for Dummies Questions & Answers User input while reading from a file Post 302935961 by sea on Friday 20th of February 2015 03:19:43 PM
Old 02-20-2015
Hi

Use read choice instead.
That is because you do compare 'y' with 'choice' rather than with 'p' wich you read.

hth
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script for reading an input file

#!/bin/sh rpt="/export/home/legato/rpt_offsite"/test_eject.tape cat <$rpt while read line do echo $line perform routine done I am trying to read the contents of this file line by line and perform a routine for each line read. The file contents are numbers.. What is wrong with my... (1 Reply)
Discussion started by: gzs553
1 Replies

2. Shell Programming and Scripting

Help reading an input file in KSH

First I' d like to say you guys are awesome. :) I have a word document that I cut and paste into Textpad and it removed all the fancy formatting which is fine with me. I WinScp'd it to the box and and called it inputfile.txt. Opened it in vi and don't see any special characters or stuff that... (2 Replies)
Discussion started by: zilla30066
2 Replies

3. Shell Programming and Scripting

Reading input from user

how do we read input from a user e.g i want to ask a user to enter 6 sets of numbers how do i control information from the user? i have this....... #!/bin/bash echo "Please enter six numbers" read number echo $number >> file1 but this stops after the first number..how can i... (2 Replies)
Discussion started by: vadharah
2 Replies

4. Shell Programming and Scripting

reading input from a file

I am trying to read input for a C program (that expects input from the user) from a file using the shell command: progname < filename but it seems that the program considers the char '<' as the first input, hence causing an "error" in my program. I checked it with another program and it... (2 Replies)
Discussion started by: nadbar
2 Replies

5. Shell Programming and Scripting

Reading specific contents from 1 input files and appending it to another input file

Hi guys, I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help. I have 2 input files (example given below) Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
Discussion started by: sksahu
5 Replies

6. Shell Programming and Scripting

awk- reading input file twice

Hello, I've been trying to come up with a solution for the following problem; I have an input file with two columns and I want to print as an output the first column without any changes but for the second column, I want to divide it by its last value. Example input: 1 9 2 10 3 11 4 12 5... (14 Replies)
Discussion started by: acsg
14 Replies

7. UNIX for Dummies Questions & Answers

Help in reading the date from the input file name

Hi, I need to read the date from the input file. The format of the input file is as follows: a_b_c_yyyymmdd.txt I need to read the date(yyyymmdd) part from the name of the input file. Would really appreciate if someone can help me in this regard Thanks a lot. (1 Reply)
Discussion started by: Sunny_teotia
1 Replies

8. Shell Programming and Scripting

reading yum user input

I am writing a script where it uses yum to install. I need to read the user input for yum ie "y or n". If the user types "y", the script should continue running. If the user types "n" then the whole script should be terminated. line1 line2 yum install package line3 line4 From above,... (5 Replies)
Discussion started by: anilcliff
5 Replies

9. Shell Programming and Scripting

Reading user input...problem with tab key

Hi all, I have a little problem with my shell script (reading user input, save user input to variable, invisible characters in the log file :() printf "1. What's your file path?" /path/to/my/file read -e FILE I have invisible characters in my log file (e.g. <ESC> or ^G) when I'm... (3 Replies)
Discussion started by: splendid
3 Replies

10. Shell Programming and Scripting

How to embed data instead of reading user input from an array?

Hello, I am running under ubuntu1 14.04 and I have a script which is sending given process names to vanish so that I'd see less output when I run most popular tools like top etc in terminal window. In usual method it works. Whenever I restart the system, I have to enter the same data from... (2 Replies)
Discussion started by: baris35
2 Replies
Config::Model::models::LCDd::glcd(3pm)			User Contributed Perl Documentation		    Config::Model::models::LCDd::glcd(3pm)

NAME
Config::Model::models::LCDd::glcd - Configuration class LCDd::glcd VERSION
version 2.021 DESCRIPTION
Configuration classes used by Config::Model generated from LCDd.conf Elements ConnectionType Select what type of connection. See documentation for types.Optional. Type uniline. default: 't6963'. Size Width and height of the display in pixel. The supported sizes may depend on the ConnectionType. Optional. Type uniline. upstream_default: '128x64'. Port t6963: Parallel port to use Optional. Type uniline. upstream_default: '0x378'. bidirectional t6963: Use LPT port in bi-directional mode. This should work on most LPT port and is required for proper timing! Optional. Type enum. choice: 'yes', 'no'. upstream_default: 'yes'. delayBus t6963: Insert additional delays into reads / writes. Optional. Type enum. choice: 'yes', 'no'. upstream_default: 'no'. useFT2 If LCDproc has been compiled with FreeType 2 support this option can be used to turn if off intentionally. Optional. Type enum. choice: 'yes', 'no'. upstream_default: 'yes'. normal_font Path to font file to use for FreeType rendering. This font must be monospace and should contain some special Unicode characters like arrows (Andale Mono is recommended and can be fetched at http://corefonts.sf.net).Optional. Type uniline. default: '/usr/local/lib/X11/fonts/TTF/andalemo.ttf'. fontHasIcons Some fonts miss the Unicode characters used to represent icons. In this case the built-in 5x8 font can used if this option is turned off. Optional. Type enum. choice: 'yes', 'no'. upstream_default: 'yes'. SEE ALSO
o cme perl v5.14.2 2012-11-09 Config::Model::models::LCDd::glcd(3pm)
All times are GMT -4. The time now is 09:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy