Sponsored Content
Top Forums UNIX for Dummies Questions & Answers A challenge for you sed/awk wizards... Post 302142080 by th3g0bl1n on Wednesday 24th of October 2007 08:14:39 AM
Old 10-24-2007
A challenge for you sed/awk wizards...

Here's a challenge for you wizards...

I have a file formatted as follows;

$[{"_q":"Bobby","_feild1":"id3","_feild2":"users","_feild3":"3bc44332a28a7","feild4":"Bobby","feild5":8,"feild6":50},{"html":1,"type":"msgitem_mini","name":"Found <span class='b'>8<\/span> results."},{"id":"87654321,12345678,09876543","ids":3,"type":"item","name":"Bobby - One"},{"id":"1107338","ids":1,"type":"item","name":"Bobby! - Two"},{"type":"msgitem","style":"HRitem"}]

What I need to output is;

87654321 Bobby One
12345678 Bobby One
09876543 Bobby One
1107338 Bobby! Two

Any Ideas how I can do this? I've tried sed but I'm not sure if perl might be a better way to go and I'm not too familiar with that.

Any help would be greatly appreciated!!



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_chalprompt_t(3SASL)		      Simple Authentication Security Layer Library Functions			  sasl_chalprompt_t(3SASL)

sasl_chalprompt_t - prompt for input in response to a challenge SYNOPSIS
cc [ flag ... ] file ... -lsasl [ library ... ] #include <sasl/sasl.h> int sasl_chalprompt_t(void *context, int id, const char *challenge, const char *prompt, const char *defresult, const char **result, unsigned *len); DESCRIPTION
Use the sasl_chalprompt_t() callback interface to prompt for input in response to a server challenge. PARAMETERS
context The context from the callback record. id The callback id. id can have a value of SASL_CB_ECHOPROMPT or SASL_CB_NOECHOPROMPT challenge The server's challenge. prompt A prompt for the user. defresult The default result. The value of defresult can be NULL result The user's response. result is a null-terminated string. len The length of the user's response. RETURN VALUES
Like other SASL callback functions, sasl_chalprompt_t() returns an integer that corresponds to a SASL error code. See <sasl.h> for a com- plete list of SASL error codes. ERRORS
SASL_OK The call to sasl_chalprompt_t() was successful. See sasl_errors(3SASL) for information on SASL error codes. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWlibsasl | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
sasl_errors(3SASL), sasl_server_new(3SASL), attributes(5) SunOS 5.10 14 Oct 2003 sasl_chalprompt_t(3SASL)

Featured Tech Videos

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