check if one string comes before another


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting check if one string comes before another
# 8  
Old 11-26-2011
Quote:
Originally Posted by vanessafan99
does the exit mean that it exits the program? its part of a program so it should be running still
You need only one pattern match to set the value to true, after that you can exit.

Quote:
Originally Posted by vanessafan99
its not working
it doesnt detect it as true when the pattern exists
Check your input and patterns again.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cant check empty string

Hello So i have that script collection, in which i have a single script to create a configuration file. In there, i have multiple occourences of something like this: prj_title=$(tui-read "What is the TITLE? ($prj_name):") ] && prj_title="${prj_name/_/ }" They all work as expected, if... (5 Replies)
Discussion started by: sea
5 Replies

2. Shell Programming and Scripting

Check for rows with particular string

Hi. The data file is as below: 2000922111111100232091212098324.... 2123011230912832094820943684896.... 3435983453409583405938453049583.... . . . I need to get only the rows that match my criteria. For example: those at characters 5-10 should equal to "922111" (thus getting only the 1st... (7 Replies)
Discussion started by: daytripper1021
7 Replies

3. Shell Programming and Scripting

Check file for string existence before appending it with string

I want to append file with a string but before doing that i want to check if this string already exist in that file.I tried with grep on Solaris 10 but unsuccessful.Man pages from grep seems to suggest if the string is found command status will be 0 and if not 1.But i am not finding it.May be i... (2 Replies)
Discussion started by: sahil_shine
2 Replies

4. Shell Programming and Scripting

A nice way to check a string

Guys, I need some advice on how to check a string, which may or may not have a entry.. Never really worked out how to do this.. May be a good time to learn now. This is what i am trying to do Run a command, to return a string If the string is not empty , then run the if statement,... (4 Replies)
Discussion started by: Junes
4 Replies

5. Shell Programming and Scripting

check if a string is numeric

I checked all the previous threads related to this and tried this. My input is all numbers or decimals greater than zero everytime. I want to check the same in the korn shell script. Just validate the string to be numeric. This is what I am doing. var="12345" if ) -o "$var" !=... (14 Replies)
Discussion started by: megha2525
14 Replies

6. UNIX for Advanced & Expert Users

check if a variable contains a string

hi I have an if condition that states: if ; then exit how to translate this? $x is a path $y is a string that comes at the end of the path thx (11 Replies)
Discussion started by: melanie_pfefer
11 Replies

7. Shell Programming and Scripting

how to check string of character

how can i check whether variable contains only character from a-z or A-Z....if my variable contains any alpha numeric, numeric or any character with some special one i.e. *%&@! etcetera etcetera....then it should show me please enter only characters...... Let my variable var1="abc77}|" then... (9 Replies)
Discussion started by: manas_ranjan
9 Replies

8. Shell Programming and Scripting

read string, check string length and cut

Hello All, Plz help me with: I have a csv file with data separated by ',' and optionally enclosed by "". I want to check each of these values to see if they exceed the specified string length, and if they do I want to cut just that value to the max length allowed and keep the csv format as it... (9 Replies)
Discussion started by: ozzy80
9 Replies

9. Shell Programming and Scripting

How to check a string in the variable

hi, I have a variable var1 as follows in the script. var1="one two three desformat=PDF xyz" I would like to check whether $var1 has a string "desformat=PDF" or not. Is there any command I can use (not need to creat a file)? Currently, I am using this: if ( grep "desformat=PDF"... (1 Reply)
Discussion started by: josephwong
1 Replies
Login or Register to Ask a Question
Gtk2::RecentInfo(3)					User Contributed Perl Documentation				       Gtk2::RecentInfo(3)

NAME
Gtk2::RecentInfo HIERARCHY
Glib::Boxed +----Gtk2::RecentInfo METHODS
timestamp = $info->get_added; timestamp = $info->get_modified; timestamp = $info->get_visited; cut integer = $info->get_age (exec, count, timestamp) = $info->get_application_info ($app_name) o $app_name (string) (applications) = $info->get_applications string = $info->get_description string = $info->get_display_name boolean = $info->exists (groups) = $info->get_groups boolean = $info->has_application ($app_name) o $app_name (string) boolean = $info->has_group ($group_name) o $group_name (string) pixbuf = $info->get_icon ($size) o $size (integer) boolean = $info->is_local string = $info->last_application boolean = $info->match ($other_info) o $other_info (Gtk2::RecentInfo) string = $info->get_mime_type unix timestamp = $info->get_modified boolean = $info->get_private_hint string = $info->get_short_name string = $info->get_uri_display string = $info->get_uri unix timestamp = $info->get_visited SEE ALSO
Gtk2, Glib::Boxed COPYRIGHT
Copyright (C) 2003-2008 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.12.1 2010-07-05 Gtk2::RecentInfo(3)