Sponsored Content
Top Forums UNIX for Dummies Questions & Answers A challenge for you sed/awk wizards... Post 302142094 by radoulov on Wednesday 24th of October 2007 10:01:39 AM
Old 10-24-2007
awk '/"id"/{split($2,n,",");for(i in n)print n[i],$6}' RS="}" FS='"[:,]"|"$' filename

Use nawk or /usr/xpg4/bin/awk on Solaris.

If the order is important Smilie

awk '/"id"/{c=split($2,n,",");for(i=1;i<=c;i++)print n[i],$6}' RS="}" FS='"[:,]"|"$' filename


9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

safeword challenge

Hi, there are some servers here at work which issue a Safeword challenge after I login. Can anyone tell me exactly how the challenge/response system works? In particular, how are the valid keys decided? (2 Replies)
Discussion started by: blowtorch
2 Replies

2. Shell Programming and Scripting

AWK Challenge

I have the following text Microsoft iSCSI Initiator version 2.0 Build 3497 Targets List: iqn.2001-05.com.equallogic:0-8a0906-daef43402-138000002a4477ba-grsrv12-extra iqn.2001-05.com.equallogic:0-8a0906-986f43402-520000002b447951-exchange ... (9 Replies)
Discussion started by: netmedic
9 Replies

3. Shell Programming and Scripting

sed replacement, challenge one!!!!

Hi all, Thanks in advanced. This question really bothered me much. What i want is to replace any times of repeated 'TB' to 'T', below is example. It can be fullfil by AWK and perl, but my desire is using SED to realize it. So here means we treat TB as a whole part, which means 's/TB*/T/'... (4 Replies)
Discussion started by: summer_cherry
4 Replies

4. Shell Programming and Scripting

sed xml challenge

I have a web xml file that looks like this: <allinfo> <info> <a>Name1<\a> <b>address1<\b> <c>phone1<c> <\info> <info> <a>Name2<\a> <b>address2<\b> <c>phone2<c> <\info> <\allinfo> I want to use sed to... (2 Replies)
Discussion started by: katrvu
2 Replies

5. Shell Programming and Scripting

regex challenge

Here's a regex substitution operation that has stumped me with sed: How do you convert lines like this: first.key ?{x.y.z} second.key ?{xa.ys.zz.s} third.key ?{xa.k} to: first.key ?{x_y_z} second.key ?{xa_ys_zz_s} third.key ?{xa_k} So i'm basically converting all the... (11 Replies)
Discussion started by: neked
11 Replies

6. What is on Your Mind?

Of Computer wizards and games

You guys are really are a genius, you make computer processing more easy for us end users. You just don't make wonders but you also make good computer games too. Really there is a fast evolution on the era of the computer world. Thanks to you guys! __________________ The Cute Angry Birds... (0 Replies)
Discussion started by: methusela123
0 Replies

7. UNIX for Advanced & Expert Users

Interesting awk/Perl/sed parsing challenge

I have a log with entries like: out/target/product/imx53_smd/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/bindings/V8HTMLVideoElement.cpp : target thumb C++: libwebcore <=... (8 Replies)
Discussion started by: glev2005
8 Replies

8. Shell Programming and Scripting

sed and awk giving error ./sample.sh: line 13: sed: command not found

Hi, I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :- ./sample.sh: line... (12 Replies)
Discussion started by: satishmallidi
12 Replies

9. Shell Programming and Scripting

Anyone like a challenge?

I have searched through google, and this forum to try and find the answer, but alas, nothing quite hits the whole answer. I am trying to read the last line (or lines) of some log files. I do this often. The files are named sequentially, using the date as part of the file name, and appending... (18 Replies)
Discussion started by: BatterBits
18 Replies
sasl_checkapop(3)						  SASL man pages						 sasl_checkapop(3)

sasl_checkapop - Check an APOP challenge/response SYNOPSIS
#include <sasl/sasl.h> int sasl_checkapop(sasl_conn_t *conn, const char *challenge, unsigned challen, const char *response, unsigned resplen); DESCRIPTION
sasl_checkapop() will check an APOP challenge/response. APOP is an optional POP3 (RFC 1939) authentication command which uses a shared secret (password). The password is stored in the SASL secrets database. For information on the SASL shared secrets database see the System Administrators Guide in the doc/ directory of the SASL distribution. If called with a NULL challenge, sasl_checkapop() will check to see if the APOP mechanism is enabled. RETURN VALUE
sasl_checkapop returns an integer which corresponds to one of the following codes. SASL_OK indicates that the authentication is complete. All other return codes indicate errors and should either be handled or the authentication session should be quit. See sasl_errors(3) for meanings of return codes. CONFORMING TO
RFC 4422, RFC 1939 SEE ALSO
sasl(3), sasl_errors(3) SASL
29 June 2001 sasl_checkapop(3)

Featured Tech Videos

All times are GMT -4. The time now is 03:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy