Sponsored Content
Top Forums UNIX for Dummies Questions & Answers checking wether an inputed character is already in a variable Post 302338289 by Tytalus on Monday 27th of July 2009 12:33:38 PM
Old 07-27-2009
It would appear that you, 602chrislys and strasner, at the least, are all working on the same sort of homework/coursework questions.

(
https://www.unix.com/unix-dummies-que...ser-input.html
https://www.unix.com/unix-dummies-que...-alphabet.html
)

I am guessing you have been tasked with writing some sort of hangman program....

Please refer to the rules, especially rule 6:
The UNIX and Linux Forums - Forum Rules

If I am mistaken I do apologise.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[csh] checking for specific character ranges in a variable

I want to check if a zip code is valid, using a variable that stores the zipcode. I am not sure how I would do this in a script. I know that simply checking for the numerical range of the number will not work, because '1' would be '00001' in zip code format. I know when I am in shell, I can use... (5 Replies)
Discussion started by: userix
5 Replies

2. UNIX for Dummies Questions & Answers

read a variable character by character, substitute characters with something else

im having trouble doing this: i have a variable with 2 characters repeating e.g. aababbbaaaababaabbaabbba is there a way i can search the variable for a's and b's and then change a's to b's and b's to a's? im guessing its like getting the 1's compliment of the string im doing this in... (2 Replies)
Discussion started by: vipervenom25
2 Replies

3. Shell Programming and Scripting

checking the value of the variable

Does anyone know the quick way to check if the variable contains only numeric characters, for example: A=123445 - correct B=#f123* - incorrect I am in ksh88i Thanks a lot for help -A (1 Reply)
Discussion started by: aoussenko
1 Replies

4. Shell Programming and Scripting

Selecting files between a user inputed date range

Hi all! I'm working on a KSH script to select files between a user inputed date range (stored in a variable) and then move them and unzip them. I'm stuck at how to get the files between the user inputed date range selected. Any help would be greatly appreciated! The files are as such: ... (6 Replies)
Discussion started by: kelldan
6 Replies

5. Shell Programming and Scripting

checking variable has value - ksh

hi all, i have a shell (ksh) script where i am reading line by line from a grep command and i wanted to check if the grep command actually returned something or was null. i can do this by using -z : if ; then ..... but this forces me to do something when $myVariable is null when i... (3 Replies)
Discussion started by: cesarNZ
3 Replies

6. UNIX for Dummies Questions & Answers

checking wether an input is using letters of the alphabet

afternoon forums. I need to get a way of testing as to wether an inputed character is part of the english alphabet. i have come up with the following code but its not working at all. until '] do echo This is not a Letter done any help would be beneficial to me. (1 Reply)
Discussion started by: strasner
1 Replies

7. Shell Programming and Scripting

Removing a character from a variable and assigning it to another variable?

Hi folks. I have this variable called FirstIN that contains something like this: 001,002,003,004... I am trying to assign the content of this variable into ModifiedIN but with the following format : 001 002 003 004...(changing the commas for spaces) I thought about using sed but i am not... (17 Replies)
Discussion started by: Stephan
17 Replies

8. UNIX for Advanced & Expert Users

Wether does it successful or unreachable?

Hi, all: How can I check what happen with my own NIC driver which response "successful" when local PC "ping" a remote linux PC but "unreachable" when it "ping" a remote windows XP PC? My writed driver runs in linux 3.0.4 kernel. thanks! li, kunlun (1 Reply)
Discussion started by: liklstar
1 Replies

9. Shell Programming and Scripting

Checking ^M character in file

i have the file <infile> with ^M charactrer. i just wnt to know through script whether the file have ^M character or not. Please let me know the script steps to check the same. Thanks in Advance Ganesh. (3 Replies)
Discussion started by: Ganesh L
3 Replies

10. Shell Programming and Scripting

Program to combine two lines in a file on checking the first character of each line

Hi, I have a requirement where I need to combine two lines in a file based on first character of each line in a file. Please find the sample content of the file below: _______________________ 5, jaya, male, 4-5-90, single smart 6, prakash, male, 5-4-84, married fair 7, raghavi, female,... (12 Replies)
Discussion started by: jayaP
12 Replies
ppmtosixel(1)                                                 General Commands Manual                                                ppmtosixel(1)

NAME
ppmtosixel - convert a portable pixmap into DEC sixel format SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC LJ250 color inkjet printer. If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file. OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com- pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni- tude larger than a compressed file and prints much slower. -margin If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci- fied, a 1.5 inch left margin will offset the image. PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?. BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation. SEE ALSO
ppm(5) AUTHOR
Copyright (C) 1991 by Rick Vinci. 26 April 1991 ppmtosixel(1)
All times are GMT -4. The time now is 08:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy