Sponsored Content
Full Discussion: Comparing strings using nawk
Top Forums Shell Programming and Scripting Comparing strings using nawk Post 302328817 by rakeshawasthi on Thursday 25th of June 2009 08:54:13 AM
Old 06-25-2009
Quote:
Originally Posted by ahmad.diab
Code:
kindly see input file!!!

there is no month written in word ..only digits.


Input....
01-04-2008_12:00:00
01-04-2005_12:00:00
01-04-2003_12:00:00
01-04-2007_12:00:00
01-04-2002_12:00:00
01-04-2009_12:00:00

For clarity I chose Mar
I meant 03>04 wil fail. Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

comparing two strings

Hi How do i compare two strings in shell script. Below is an example but I am not getting the desired output, plz help if then echo success fi I am not getting the desired output if I do this. plz help (24 Replies)
Discussion started by: ragha81
24 Replies

2. UNIX for Advanced & Expert Users

Comparing strings

I have two strings a=Mar22 b=may21 how can I compare them Is this fine if then; . ... else .... fi or if then (2 Replies)
Discussion started by: yakyaj
2 Replies

3. Shell Programming and Scripting

Comparing Two Strings

Hi All, While I am trying to run below code I Am getting the exception like ./abs.sh: line 102: syntax error near unexpected token `then' ./abs.sh: line 102: ` then' The Code Snippet is: if then cat $file1 | sed -e... (8 Replies)
Discussion started by: Anji
8 Replies

4. Shell Programming and Scripting

comparing strings

i have a string in a file which gets repeated number of times like below: rpttxt("abc") . . rpttxt("REP_TITLE") rpttxt("BOS_TITLE") . . . . and so on using awk or grep how can i comapre the string( as the second half keeps varying) and store it in a temporary variable? I am using the... (3 Replies)
Discussion started by: agarwal
3 Replies

5. Shell Programming and Scripting

comparing 2 strings

hi i have 2 strings. i want to compare the strings. please help (2 Replies)
Discussion started by: satish@123
2 Replies

6. Shell Programming and Scripting

comparing two strings

hi All i am facing prob in comparing two strings that have two word. below is the code snippet. checkValidates="file validates" file3_name="file" if then echo "file" $file3_name "is validated successfully" fi when i run this i get the error as -bash: [: too many arguments ... (1 Reply)
Discussion started by: infyanurag
1 Replies

7. Shell Programming and Scripting

comparing awk and nawk

Hi Guys, i tried these two commands. First in awk and nawk. The nawk command is running fine but the awk command is throwing error. What is wrong with the awk command. There are lot of awk commands running fine in my system d003:/usr/local/dsadm/dsprod>nawk 'NR = 1 {print " "$0}' a.txt ... (6 Replies)
Discussion started by: mac4rfree
6 Replies

8. Shell Programming and Scripting

Comparing strings with sed

Input: The the the the Output: not-same same What would be the sed command to do this? (7 Replies)
Discussion started by: cola
7 Replies

9. Shell Programming and Scripting

comparing strings as ints

Hi, So I got his code below. $year is a string of 2010,2011 etc. I guess I want to convert $year to an integer so I can do my if statement to see if the year string is greater than 2010? Or how could I do this? Right now I get a syntax error doing this. if; then do stuff fi (2 Replies)
Discussion started by: vsekvsek
2 Replies

10. Shell Programming and Scripting

Comparing Strings in ksh88

Hi I tried the following string comparison script in Ksh88 #!/bin/ksh str1='aC' str2='ABC' if then echo "Equal" else echo "Not Equal" fi Though str1 and str2 are not equal the script output says Equal . Please correct me Thanks (2 Replies)
Discussion started by: smile689
2 Replies
CJK LaTeX batch commands(1)				      General Commands Manual				       CJK LaTeX batch commands(1)

NAME
bg5latex - Use LaTeX directly on a Big5 encoded .tex file bg5pdflatex - Use pdfLaTeX directly on a Big5 encoded .tex file bg5+latex - Use LaTeX directly on a Big5+ encoded .tex file bg5+pdflatex - Use pdfLaTeX directly on a Big5+ encoded .tex file cef5latex - Use LaTeX directly on a Big5 encoded .tex file containing CEF macros cef5pdflatex - Use pdfLaTeX directly on a Big5 encoded .tex file containing CEF macros ceflatex - Use LaTeX directly on a .tex file containing CEF macros cefpdflatex - Use pdfLaTeX directly on a .tex file containing CEF macros cefslatex - Use LaTeX directly on an SJIS encoded .tex file containing CEF macros cefspdflatex - Use pdfLaTeX directly on an SJIS encoded .tex file containing CEF macros gbklatex - Use LaTeX directly on a GBK encoded .tex file gbkpdflatex - Use pdfLaTeX directly on a GBK encoded .tex file sjislatex - Use LaTeX directly on an SJIS encoded .tex file sjispdflatex - Use pdfLaTeX directly on an SJIS encoded .tex file SYNOPSIS
bg5latex file.tex bg5pdflatex file.tex etc. DESCRIPTION
This manual page briefly documents the different *latex batch files that come with the CJK LaTeX macro. The *latex commands are shell scripts that will convert a (Big5(+), GBK or SJIS encoded) .tex file in a .cjk file using the respective *conv command resulting in a .cjk file, and will then run (pdf)latex on the .cjk file. If you use Big5+ encoding, then use bg5+latex or bg5+pdflatex. If you use CEF macro's in your Big5 or SJIS encoded file, use cef5latex or cefslatex resp. instead. If it's in plain ASCII, use ceflatex. If you use GNU/Emacs (>=20), you don't have to use any of these commands: just put the Lisp file "cjk-enc.el" in Emacs' load-path, load the library "cjk-enc" and run "M-x cjk-write-file" to create a .cjk file. Then process the .cjk file with latex or pdflatex. SEE ALSO
bg5conv(1), bg5+conv(1), cef5conv(1), cefconv(1), cefsconv(1), extconv(1), sjisconv(1), the CJK documentation files in /usr/share/doc/latex-cjk-common/. AVAILABILITY
The *latex scripts are part of the CJK macro package for LaTeX 2e available at the CTAN hosts and its mirrors, and available for Debian under latex-cjk-chinese and latex-cjk-japanese. AUTHOR
The programs mentioned under NAME were written by Werner Lemberg <wl@gnu.org>. This manual page was written by Danai SAE-HAN <danai.sae-han@edpnet.be> for the Debian project. It is licensed under the GNU General Pub- lic License version 2 or higher, of which you can find a copy online at http://www.gnu.org/licenses/gpl.txt or on Debian systems under /usr/share/common-licenses/GPL-2 (part of the "base-files" package). CJK Version 4.6.0 29-Jun-2006 CJK LaTeX batch commands(1)
All times are GMT -4. The time now is 05:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy