Sponsored Content
Top Forums Shell Programming and Scripting how to set a variable to accept alpha-numeric characters? Post 22432 by bcaunt on Monday 3rd of June 2002 08:33:07 PM
Old 06-03-2002
how to set a variable to accept alpha-numeric characters?

I am working on a shell program that needs to accept alpha-numeric input (i.e., P00375); when I use a simple 'read' statement to read in the input (i.e., read LOG), I receive the message "p00375: bad number". How must I adjust my input statement to accept alpha-numerics?

Thanks!
Brent
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replacing set of characters with a value of a variable

I need to replace anything immediately after the pattern "standard01/" in a file with the value of a variable I don't know the length of the characters stored in that variable. - that might vary. I know there is some string after the pattern "standard01/", i don't know the what the string is or... (1 Reply)
Discussion started by: prekida
1 Replies

2. Solaris

Password without numeric characters

G'day guys, Just a simple question: Is it possible to set user's passwords without numeric characters? I prefer to have passwords as simple words, but when going through SMC, i get an error that the first six characters must contain at least 2 alphabetic and 1 numeric. Server is a Sun... (3 Replies)
Discussion started by: drchris
3 Replies

3. Shell Programming and Scripting

Awk , Sed Print last 4 numeric characters

Hello All, I have been searching and trying this for a bit now. Can use some assistance. Large 5000 line flat file. bash, rhel5 Input File Sinppet: Fri Oct 30 09:24:02 EDT 2009 -- 1030 Fri Oct 30 09:26:01 EDT 2009 -- 73 Fri Oct 30 09:28:01 EDT 2009 -- 1220 Fri Oct 30 09:30:01 EDT... (9 Replies)
Discussion started by: abacus
9 Replies

4. Shell Programming and Scripting

Count the alpha numeric

Hi all. This is one of my interview question. input : apple output : a - 1 p - 2 l - 1 e - 1 i written the code like this echo "apple" | fold -w1 | sort | uniq -c | awk '{print $2 "-->" $1}' is any other way to do ? (5 Replies)
Discussion started by: itkamaraj
5 Replies

5. Shell Programming and Scripting

Getting rid of non-numeric and non-characters

I have a database script that always produces the following output: 0 btw, the unwanted character looks like a square on a unix system. it doesn't look like the above quote. how can I get rid of it and only keep the "0"? ---------- Post updated at 01:57 PM ---------- Previous update was... (2 Replies)
Discussion started by: SkySmart
2 Replies

6. Shell Programming and Scripting

Sorting the alpha numeric results of Hash

Hi All I've got a perl script that I'm having a problem with when it prints the output of a hash. Some background. I'm trying to merge two file with a similar structure but with different data. Here is a portion of the script I'm using. while (<INPUT>) { my... (0 Replies)
Discussion started by: kingpin2502
0 Replies

7. Shell Programming and Scripting

Bash script to accept password and replace characters with * as they are typed

I googled this and couldn't find an answer, so I rolled my own. Here it is, hope it helps. Feel free to improve on it. #!/bin/bash PWORD= ANYKEY=0 echo -n "Password: " until do read -N 1 -s ANYKEY echo -n "*" PWORD="$PWORD$ANYKEY" done echo echo $PWORD exit (3 Replies)
Discussion started by: krisdames
3 Replies

8. UNIX for Dummies Questions & Answers

How to remove numeric characters in the flat file

HI, can any one help me please .. i have flat file like qwer123rt ass3242ccf jjk654 kjh838ppp nhdg453ok hdkk34 i want remove numeric characters in the flat file i want output like this qwerrt assccf jjk kjhppp nhdgok hdkk help me... (4 Replies)
Discussion started by: rafimd1985
4 Replies

9. Shell Programming and Scripting

Splitting the numeric vs alpha values in a column to distinct columns

How could i take an input file and split the numeric values from the alpha values (123 vs abc) to distinc columns, and if the source is blank to keep it blank (null) in both of the new columns: So if the source file had a column like: Value: |1 | |2.3| | | |No| I would... (7 Replies)
Discussion started by: driftlogic
7 Replies

10. Shell Programming and Scripting

Grep string with regex numeric characters

Hi all, I have the following entries in a file: Cause Indicators=80 90 Cause Indicators=80 90 Cause Indicators=82 90 Cause Indicators=82 90 Cause Indicators=82 90 The first 2 digits might change so I am after a sort of grep which could find any first 2 digits + the second 2,... (3 Replies)
Discussion started by: nms
3 Replies
ximtoppm(1)						      General Commands Manual						       ximtoppm(1)

NAME
ximtoppm - convert an Xim file into a portable pixmap SYNOPSIS
ximtoppm [--alphaout={alpha-filename,-}] [ximfile] DESCRIPTION
Reads an Xim file as input. Produces a portable pixmap as output. The Xim toolkit is included in the contrib tree of the X.V11R4 release. OPTIONS
--alphaout=alpha-filename ximtoppm creates a PGM (portable graymap) file containing the alpha channel values in the input image. If the input image doesn't contain an alpha channel, the alpha-filename file contains all zero (transparent) alpha values. If you don't specify --alphaout, ximtoppm does not generate an alpha file, and if the input image has an alpha channel, ximtoppm simply discards it. If you specify - as the filename, ximtoppm writes the alpha output to Standard Output and discards the image. Actually, an Xim image can contain an arbitrary fourth channel -- it need not be an Alpha channel. ximtoppm extracts any fourth channel it finds as described above; it doesn't matter if it is an alpha channel or not. See pnmcomp(1) for one way to use the alpha output file. All options can be abbreviated to their shortest unique prefix. SEE ALSO
pnmcomp(1), ppm(5) AUTHOR
Copyright (C) 1991 by Jef Poskanzer. April 2, 2000 ximtoppm(1)
All times are GMT -4. The time now is 09:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy