Sponsored Content
Full Discussion: Finding a letter in a string
Top Forums Shell Programming and Scripting Finding a letter in a string Post 302357681 by balamv on Wednesday 30th of September 2009 11:13:33 AM
Old 09-30-2009
Finding a letter in a string

How to check whether a particular string contains dot [.] or not?
Here I can not use grep as the string is not in a file. I will get this string from user input

Thanks,
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to find capital letter names in a file without finding words at start of sentence

Hi, I want to be able to list all the names in a file which begin with a capital letter, but I don't want it to list words that begin a new sentence. Is there any way round this? Thanks for your help. (1 Reply)
Discussion started by: kev269
1 Replies

2. Shell Programming and Scripting

get only two letter from any string

I want get middle two latter of any string. Input: var="070108" output: var1="01" please help. (2 Replies)
Discussion started by: rinku
2 Replies

3. Shell Programming and Scripting

Extract the letter from string

Hi, Pl help me. User is entering the values for the given input Enter keys: secret1 secret2 secret3 can i extract the last digit of each values in the keys.. here for ex. 1 2 3 can we get this using shell script? (22 Replies)
Discussion started by: balamv
22 Replies

4. Shell Programming and Scripting

First Letter in a String to be capitalized

Is there a way to cnvert first letter alone in a string to upper case. For eg: diamond should be converted to Diamond. Thanks in Advance, Kinny (6 Replies)
Discussion started by: kinny
6 Replies

5. Shell Programming and Scripting

change each letter of a string

Is there a way to change each letter of a string to the next one in the alphabet, so that a becomes b and f becomes g, and digits become one unit bigger - 4 becomes 5 and 9 becomes 0. I want to change strings like ben123 to cfo234. (5 Replies)
Discussion started by: locoroco
5 Replies

6. Shell Programming and Scripting

Trying to take a string and break each letter into a separate variable

I am trying to make a script that takes a word and each letter up and turns it into a separate variable. My code currently does not work but I feel I just need to tweak one thing that I am unsure of. (ex: if forum was typed in letter1=f; letter2=o; letter3=r;...) Thank you count=1; ... (7 Replies)
Discussion started by: crimputt
7 Replies

7. Homework & Coursework Questions

C++ homework, finding a letter from a file

Write a program which asks user to enter a string and that string saves in a .txt file. After the file has been saved your program must count how many time letter 'a' has been reapeated ? Use fstream, string, and cctype libraries to make your jobe easier. I wrote following code #include... (1 Reply)
Discussion started by: solaris_user
1 Replies

8. Shell Programming and Scripting

check index of a string by finding a letter in it

i would like to search for a letter in a string and get its index position. example: name='john' pos=$(expr index $name o) the result will be equal to 2 (2nd position) how do you make this thing not case sensitive? example: name='john' pos=$(expr index $name O) the... (1 Reply)
Discussion started by: kokoro
1 Replies

9. Shell Programming and Scripting

Counting all words that start with a capital letter in a string using python dictionary

Hi, I have written the following python snippet to store the capital letter starting words into a dictionary as key and no of its appearances as a value in this dictionary against the key. #!/usr/bin/env python import sys import re hash = {} # initialize an empty dictinonary for line in... (1 Reply)
Discussion started by: royalibrahim
1 Replies

10. Shell Programming and Scripting

Issue catching/reading 2 digits and 3 letter string between brackets

Hello I'm writing a handler for ffmpeg, and having troubles to catch some exceptions that may occour with certain files. In order to parse for video & subtitle maps, i've had to make the raw data easier to handle, until now this worked well, but basicly i've just been lucky... The input... (1 Reply)
Discussion started by: sea
1 Replies
GZGREP(1)						      General Commands Manual							 GZGREP(1)

NAME
gzgrep, gzegrep, gzfgrep - search possibly compressed files for a regular expression SYNOPSIS
gzgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
gzgrep is used to invoke the grep on compress'ed or gzip'ed files. All options specified are passed directly to grep. If no file is speci- fied, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If gzgrep is invoked as gzegrep or gzfgrep then egrep or fgrep is used instead of grep. If the GREP environment variable is set, gzgrep uses it as the grep program to be invoked. For example: for sh: GREP=fgrep gzgrep string files for csh: (setenv GREP fgrep; gzgrep string files) AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), egrep(1), fgrep(1), gzdiff(1), gzmore(1), gznew(1), gzforce(1), gzip(1), gzexe(1) ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWgzip | +--------------------+-----------------+ |Interface Stability | External | +--------------------+-----------------+ NOTES
Source for gzip is available in the SUNWgzipS package. GZGREP(1)
All times are GMT -4. The time now is 06:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy