Sponsored Content
Full Discussion: [Solved] String Comparison
Top Forums Shell Programming and Scripting [Solved] String Comparison Post 302740977 by drl on Friday 7th of December 2012 09:28:01 AM
Old 12-07-2012
Hi, anurupa777.
Code:
% perldoc -q approx
Found in /usr/share/perl/5.10/pod/perlfaq6.pod
   How can I do approximate matching?
       See the module String::Approx available from CPAN.

Best wishes ... cheers, drl
 

10 More Discussions You Might Find Interesting

1. Programming

String Comparison

Hi all, I have a file like this ibhib=ere wefwfl=werfe sfdes=wef From this file, i need to get the lefthand side string with respect to the corresponding righthand side string. i.e, I need to get the string "ere" with respect to "ibhib". But i am stuck with how to compare a string... (1 Reply)
Discussion started by: abey
1 Replies

2. Shell Programming and Scripting

string comparison

Hello experts, (tcsh shell) Quite new to shell scripting... I have got a file with a single word on each line. Want to be able to make a comparison such that i can read pairs of words that are ROT13 to each other. Also, i would like to print the pairs to another file. Any help... (5 Replies)
Discussion started by: Jatsui
5 Replies

3. Shell Programming and Scripting

Help with String Comparison

I'm running the following script to compare string values to a regexp: for entry in $(lpinfo -v | cut -c 1-); do if then echo "blah" continue fi done Whenever I run it, each token of lpinfo is being interpreted as a command and I get errors such as: ... (2 Replies)
Discussion started by: hypnotic_meat
2 Replies

4. Shell Programming and Scripting

String comparison

Hi, I have the below logic. Here 'X' is a variable having some string. if then echo "i dont need to go to ofc" else echo "i need to go to ofc" Please help me to write it in unix. Thanks. (2 Replies)
Discussion started by: 46019
2 Replies

5. Shell Programming and Scripting

Help with string comparison

#!/bin/sh PRINTF=/usr/bin/printf MACHINE_NAME=`uname -n` TIME=`date +"%H"` $PRINTF "Welcome to $MACHINE_NAME. What is your name?\n" read NAME if ; then $PRINTF "Good morning $NAME, how are you?\n" elif ; then $PRINTF "Good afternoon $NAME, how are you?\n" else $PRINTF "Good... (2 Replies)
Discussion started by: ikeQ
2 Replies

6. Shell Programming and Scripting

to extract string from main string and string comparison

continuing from my previous post, whose link is given below as a reference https://www.unix.com/shell-programming-scripting/171076-shell-scripting.html#post302573569 consider there is create table commands in a file for eg: CREATE TABLE `Blahblahblah` ( `id` int(11) NOT NULL... (2 Replies)
Discussion started by: vivek d r
2 Replies

7. Homework & Coursework Questions

passing letters from an array into a string for string comparison

attempting the hangman program. This was an optional assignment from the professor. I have completed the logical coding, debugging now. ##I have an array $wordString that initializes to a string of dashes ##reflecting the number of letters in $theWord ##every time the user enters a (valid)... (5 Replies)
Discussion started by: lotsofideas
5 Replies

8. Shell Programming and Scripting

[Solved] String integer comparison

I am trying to execute something like this file=/tmp/test.txt firstline=$(head -n 1 $file) value=`echo $firstline | cut -d'=' -f2` if then echo true fi i read the first line of a file, cut to the numeric value in the first line and check if it greater than 2 but for some... (11 Replies)
Discussion started by: madhan_dc
11 Replies

9. Shell Programming and Scripting

String comparison

hi team, i want to compare the below string from logs, but its is not working. if ]; then echo "restart some process" fi (4 Replies)
Discussion started by: mfaizan40
4 Replies

10. Shell Programming and Scripting

awk string comparison unterminated quoted string andrule of thumb

I have the logic below to look up for matches within the columns between the two files with awk. In the if statement is where the string comparison is attempted with == The issue seems to be with the operands, as 1. when " '${SECTOR}' " -- double quote followed by single quote -- awk matches... (1 Reply)
Discussion started by: deadyetagain
1 Replies
Pod(3)							User Contributed Perl Documentation						    Pod(3)

NAME
Gimp::Pod - Evaluate pod documentation embedded in scripts. SYNOPSIS
use Gimp::Pod; $pod = new Gimp::Pod; $text = $pod->format (); $html = $pod->format ('html'); $synopsis = $pod->section ('SYNOPSIS'); $author = $pod->author; @sections = $pod->sections; DESCRIPTION
"Gimp::Pod" can be used to find and parse embedded pod documentation in gimp-perl scripts. At the moment only the formatted text can be fetched, future versions might have more interesting features. METHODS
new return a new Gimp::Pod object representing the current script or undef, if an error occured. format([$format]) Returns the embedded pod documentation in the given format, or undef if no documentation can be found. Format can be one of 'text', 'html', 'man' or 'latex'. If none is specified, 'text' is assumed. section($header) Tries to retrieve the section with the header $header. There is no trailing newline on the returned string, which may be undef in case the section can't be found. author blurb description copyright Tries to retrieve fields suitable for calls to the register function. sections Returns a list of paragraphs found in the pod. AUTHOR
Marc Lehmann <pcg@goof.com> SEE ALSO
perl(1), Gimp(1), perl v5.8.0 2001-12-06 Pod(3)
All times are GMT -4. The time now is 08:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy