Sponsored Content
Top Forums UNIX for Advanced & Expert Users how can awk match multi pattern in a string Post 302175434 by sleepy_11 on Friday 14th of March 2008 02:01:44 AM
Old 03-14-2008
Thanks, it works perfectly. and easier than the way i tried.....
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Match pattern and replace with string

hi guys, insert into /*<new>*/abc_db.tbl_name this is should be replaced to insert into /*<new>*/${new}.tbl_name it should use '.' as delimiter and replace is there any way to do it using sed (6 Replies)
Discussion started by: sol_nov
6 Replies

2. Shell Programming and Scripting

Use to awk to match pattern, and print the pattern

Hi, I know how to use awk to search some expressions like five consecutive numbers, , this is easy. However, how do I make awk print the pattern that is been matched? For example: input: usa,canada99292,japan222,france59664,egypt223 output:99292,59664 (6 Replies)
Discussion started by: grossgermany
6 Replies

3. Shell Programming and Scripting

Date Pattern Match (replacement string)

Hello, i am splitting files and sometimes the string of the pattern doesnt exist in the input file it starts for example with 00:00:01. So the output is completely desorganized, is there any way of putting a replacement string in the pattern so it will grab all the times from 00:**:** to first... (0 Replies)
Discussion started by: x-plicit78
0 Replies

4. Shell Programming and Scripting

Match elements in an AWK multi-dimensional array

Hello, I have two files in the following format; file1: A B C D E F G H I J K L file2: 1 2 3 4 5 6 7 8 9 10 11 12 I have read them both in to multi-dimensional arrays. I need a file that has column 2 of the first file printed out for each column 3 of the second file ie... ... (3 Replies)
Discussion started by: cold_Que
3 Replies

5. Shell Programming and Scripting

AWK break string into fields + pattern match

I am trying to break a string into separate fields and print the field that matches a pattern. I am using awk at the moment and have gotten this far: awk '{for(i=1;i<=NF;++i)print "\t" $i}' longstring This breaks the string into fields and prints each field on a separate line. I want to add... (2 Replies)
Discussion started by: Moxy
2 Replies

6. Shell Programming and Scripting

AWK match $1 $2 pattern in file 1 to $1 $2 pattern in file2

Hi, I have 2 files that I have modified to basically match each other, however I want to determine what (if any) line in file 1 does not exist in file 2. I need to match column $1 and $2 as a single string in file1 to $1 and $2 in file2 as these two columns create a match. I'm stuck in an AWK... (9 Replies)
Discussion started by: right_coaster
9 Replies

7. Shell Programming and Scripting

pattern match in a string

Hello, Please see below line code: #!/bin/ksh set -x /usr/bin/cat /home/temp |while read line do if ] then echo "matched" else echo "nope" fi done content of filr temp is as below (4 Replies)
Discussion started by: skhichi
4 Replies

8. Shell Programming and Scripting

Awk to match a pattern and perform a search after the first pattern

Hello Guyz I have been following this forum for a while and the solutions provided are super useful. I currently have a scenario where i need to search for a pattern and start searching by keeping the first pattern as a baseline ABC DEF LMN EFG HIJ LMN OPQ In the above text i need to... (8 Replies)
Discussion started by: RickCharles
8 Replies

9. Shell Programming and Scripting

Pattern Match & Extract from a string

Hi, I have long string in 2nd field, as shown below: REF1 | CLESCLJSCSHSCSMSCSNSCSRSCUDSCUFSCU7SCV1SCWPSCXGPDBACAPA0DHDPDMESED6 REF2 | SBR4PCBFPCDRSCSCG3SCHEBSCKNSCKPSCLLSCMCZXTNPCVFPCV6P4KL0DMDSDSASEWG I have a group of fixed patterns which can occur in these long strings & only... (11 Replies)
Discussion started by: karumudi7
11 Replies

10. Shell Programming and Scripting

awk : match only the pattern string , not letters or numbers after that.

Hi Experts, I am finding difficulty to get exact match: file OPERATING_SYSTEM=HP-UX LOOPBACK_ADDRESS=127.0.0.1 INTERFACE_NAME="lan3" IP_ADDRESS="10.53.52.241" SUBNET_MASK="255.255.255.192" BROADCAST_ADDRESS="" INTERFACE_STATE="" DHCP_ENABLE=0 INTERFACE_NAME="lan3:1"... (6 Replies)
Discussion started by: rveri
6 Replies
KRB524_CONVERT_CREDS_KDC(3)				   BSD Library Functions Manual 			       KRB524_CONVERT_CREDS_KDC(3)

NAME
krb524_convert_creds_kdc, krb524_convert_creds_kdc_ccache -- converts Kerberos 5 credentials to Kerberos 4 credentials LIBRARY
Kerberos 5 Library (libkrb5, -lkrb5) SYNOPSIS
#include <krb5.h> krb5_error_code krb524_convert_creds_kdc(krb5_context context, krb5_creds *in_cred, struct credentials *v4creds); krb5_error_code krb524_convert_creds_kdc_ccache(krb5_context context, krb5_ccache ccache, krb5_creds *in_cred, struct credentials *v4creds); DESCRIPTION
Convert the Kerberos 5 credential to Kerberos 4 credential. This is done by sending them to the 524 service in the KDC. krb524_convert_creds_kdc() converts the Kerberos 5 credential in in_cred to Kerberos 4 credential that is stored in credentials. krb524_convert_creds_kdc_ccache() is different from krb524_convert_creds_kdc() in that way that if in_cred doesn't contain a DES session key, then a new one is fetched from the KDC and stored in the cred cache ccache, and then the KDC is queried to convert the credential. This interfaces are used to make the migration to Kerberos 5 from Kerberos 4 easier. There are few services that still need Kerberos 4, and this is mainly for compatibility for those services. Some services, like AFS, really have Kerberos 5 supports, but still uses the 524 inter- face to make the migration easier. SEE ALSO
krb5(3), krb5.conf(5) HEIMDAL
March 20, 2004 HEIMDAL
All times are GMT -4. The time now is 01:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy