Sponsored Content
Full Discussion: To ignore user input case.
Top Forums Shell Programming and Scripting To ignore user input case. Post 302388449 by Franklin52 on Wednesday 20th of January 2010 12:59:33 PM
Old 01-20-2010
Or only with awk:

Code:
awk -F":" 'BEGIN {
  printf "Enter the title: "
  getline input < "-"
  title=toupper(input)
}
toupper($1) ~ title
' Filename

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Ignore Case in Shell

Hi New to this Unix dot com. I would like to know how i can ignore the case in filename which is getting as user directoty to shell script. For Ex: Source (/aa/bb/patch/) Directory may contains more than 1 files as like 1. aa.csv or Aa.csv or AA.csv or aa.CSV 2. bb.csv 3. ... (3 Replies)
Discussion started by: AAH
3 Replies

2. Shell Programming and Scripting

Ignore case sensitive in Case Switch

In a Case switch, how to ignore case sensitive in the test: e.g. case "$field" in "TEST) action1;; *) action2;; esac How to go in action1 in case of $field = TEST , or Test , or test or .... without enumerating all possibilities... Thanks,... (1 Reply)
Discussion started by: annelisa
1 Replies

3. Shell Programming and Scripting

How do I ignore one character in a case statement? PLEASE HELP!

Hello, I am new to this forums. I need help with shell, and ksh in particular. I have a case statement that does something if -k. So it looks like: case $arg in -k) PUT=y, SEND=1 Thats all good and dandy. But now I want to change it where whether or not the user puts -k or not, it will do... (2 Replies)
Discussion started by: cpunisher
2 Replies

4. Programming

Ignore case in a test?

How do I ignore the case in an if condition..? EDIT: I put this in the wrong board...this is a linux script. if then echo "Same name." else echo "Different name." fi (1 Reply)
Discussion started by: Bandit390
1 Replies

5. Shell Programming and Scripting

how to ignore case

Hi All, The means I use to ignore case, as an example is the following snippet: It should accept any oof the following y|Y|YES|Yes|n|N|NO|No echo "Enter Y/N to continue: " read choice; (3 Replies)
Discussion started by: raghur77
3 Replies

6. Shell Programming and Scripting

!!VERY URGENT!! Trouble in getting user input, while using under CASE statement in UNIX

i want to get user input like this please tell which option to chose 1. mango 2. tango 3. rango if user chooses mango then it should execute a set of statements and again ask like this what do you want to do 1.add 2.subtract 3.exit when i choose exit it should goto my previous... (1 Reply)
Discussion started by: s.deepak
1 Replies

7. Shell Programming and Scripting

Trouble in getting user input while using CASE statement in UNIX

i want to get user input like this please tell which option to chose 1. mango 2. tango 3. rango if user chooses mango then it should execute a set of statements and again ask like this what do you want to do 1.add 2.subtract 3.exit when i choose exit it should goto my previous menu... (4 Replies)
Discussion started by: s.deepak
4 Replies

8. Shell Programming and Scripting

How to ignore case(upper and lower) from user input?

Hi, In my script it takes the input from the user. i.e. sys or system. How can i make it case insensitive in my code. if || ; then echo "valid" Any help is appreciated. Thanks, priya (4 Replies)
Discussion started by: priya001
4 Replies

9. Shell Programming and Scripting

Case Contruct Problem user input

This is supposed to be a simple bank script. Whenever I try the case construct options it wont work for the deposit option after typing the amount it just goes straight back into the menu, same with withdrawal option. Option 3 which should just display the balance amount doesn't echo anything. The... (2 Replies)
Discussion started by: jcnewton13
2 Replies

10. Homework & Coursework Questions

How to read user keyboard input inside the case?

I need to Write a shell script that allows some system-administration tasks to be preformed automatically from a menu-driven interface. with automated following tasks: Copy directory tree Delete files or directories Output Information (this part is done ) *Copy directory tree The “Copy... (2 Replies)
Discussion started by: femchi
2 Replies
tcldocstrip(n)															    tcldocstrip(n)

__________________________________________________________________________________________________________________________________________________

NAME
tcldocstrip - Tcl-based Docstrip Processor SYNOPSIS
tcldocstrip output ?options? input ?guards? tcldocstrip ?options? output (?options? input guards)... tcldocstrip -guards input _________________________________________________________________ DESCRIPTION
The application described by this document, tcldocstrip, is a relative of docstrip, a simple literate programming tool for LaTeX. tcldocstrip is based upon the package docstrip. USE CASES tcldocstrip was written with the following three use cases in mind. [1] Conversion of a single input file according to the listed guards into the stripped output. This handles the most simple case of a set of guards specifying a single document found in a single input file. [2] Stitching, or the assembly of an output from several sets of guards, in a specific order, and possibly from different files. This is the second common case. One document spread over several inputs, and/or spread over different guard sets. [3] Extraction and listing of all the unique guard expressions and guards used within a document to help a person which did not author the document in question in familiarizing itself with it. COMMAND LINE tcldocstrip output ?options? input ?guards? This is the form for use case [1]. It converts the input file according to the specified guards and options. The result is written to the named output file. Usage of the string - as the name of the output signals that the result should be written to stdout. The guards are document-specific and have to be known to the caller. The options will be explained later, in section OPTIONS. path output (in) This argument specifies where to write the generated document. It can be the path to a file or directory, or -. The last value causes the application to write the generated documented to stdout. If the output does not exist then [file dirname $output] has to exist and must be a writable directory. path inputfile (in) This argument specifies the path to the file to process. It has to exist, must be readable, and written in docstrip format. tcldocstrip ?options? output (?options? input guards)... This is the form for use case [2]. It differs from the form for use case [1] by the possibility of having options before the output file, which apply in general, and specifying more than one inputfile, each with its own set of input specific options and guards. It extracts data from the various input files, according to the specified options and guards, and writes the result to the given output, in the order of their specification on the command line. Options specified before the output are global settings, whereas the options specified before each input are valid only just for this input file. Unspecified values are taken from the global set- tings, or defaults. As for form [1] using the string - as output causes the application to write to stdout. Using the string . for an input file signals that the last input file should be used again. This enables the assembly of the output from one input file using multiple and different sets of guards, without having to specify the full name of the file every time. tcldocstrip -guards input This is the form for use case [3]. It determines the guards, and unique guard expressions used within the provided input document. The found strings are written to stdout, one string per line. OPTIONS This section describes all the options available to the user of the application, with the exception of the option -guards. This option was described already, in section COMMAND LINE. -metaprefix string This option is inherited from the command docstrip::extract provided by the package docstrip. It specifies the string by which the '%%' prefix of a metacomment line will be replaced. Defaults to '%%'. For Tcl code this would typically be '#'. -onerror mode This option is inherited from the command docstrip::extract provided by the package docstrip. It controls what will be done when a format error in the text being processed is detected. The settings are: ignore Just ignore the error; continue as if nothing happened. puts Write an error message to stderr, then continue processing. throw Throw an error. ::errorCode is set to a list whose first element is DOCSTRIP, second element is the type of error, and third element is the line number where the error is detected. This is the default. -trimlines bool This option is inherited from the command docstrip::extract provided by the package docstrip. Controls whether spaces at the end of a line should be trimmed away before the line is processed. Defaults to true. -preamble text -postamble text -nopreamble -nopostamble The -no*amble options deactivate file pre- and postambles altogether, whereas the -*amble options specify the user part of the file pre- and postambles. This part can be empty, in that case only the standard parts are shown. This is the default. Preambles, when active, are written before the actual content of a generated file. In the same manner postambles are, when active, written after the actual content of a generated file. BUGS, IDEAS, FEEDBACK This document, and the application it describes, will undoubtedly contain bugs and other problems. Please report such in the category doc- strip of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either application and/or documentation. SEE ALSO
docstrip KEYWORDS
COPYRIGHT
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users.sourceforge.net> Textprocessing toolbox 1.0 tcldocstrip(n)
All times are GMT -4. The time now is 05:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy