Sponsored Content
Full Discussion: AWK Challenge
Top Forums Shell Programming and Scripting AWK Challenge Post 302168055 by netmedic on Saturday 16th of February 2008 07:16:57 PM
Old 02-16-2008
If I do a awk '/SQL-2005-UserDB/ { print }' filename won't that print each SQL-2005-UserDB that is found. I the file its looking at there may be multiple SQL-2005-userDB. Out of all it finds I need to print only the one that matches the current date and one that is the latest time.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

A find and sort challenge...

Hi, I need to generate a listing of files that have been changed since x day. the listing is to be sorted by date. I managed to get the 1st requirement using the find command : find . -mtime -100 -type f -ls but I don't know how to sort the ls listing by date. :( The challenge comes... (4 Replies)
Discussion started by: ppohz
4 Replies

2. UNIX for Dummies Questions & Answers

Loaded question - anyone up to the challenge?

Hello everyone. I am new to these forums and also new to Unix. And by saying "new to Unix" I mean I have never used it and 10 minutes ago was asked to start learning. So here I am. I was wondering if anyone could help me find out how long it would take to write code in Unix that will do the... (1 Reply)
Discussion started by: idesaj
1 Replies

3. 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

4. UNIX for Dummies Questions & Answers

A challenge for you sed/awk wizards...

Here's a challenge for you wizards... I have a file formatted as follows; $ 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... (2 Replies)
Discussion started by: th3g0bl1n
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. Shell Programming and Scripting

Geo Weather Challenge

Hi everybody, I'm new to these forums and this is my first post. A couple days ago I was trying to find a simple script that would return an individual's local weather conditions using I.P. based geolocation. After many failed search attempts, I began my quest to create this for myself. I have to... (0 Replies)
Discussion started by: o0110o
0 Replies

7. Shell Programming and Scripting

PS1 challenge

Ok then i Have a challenge for you : Give me PS1 so that it always display the least 2 levels of directory (except if i am above of course) I want it this way : so if i go to / /home/ /home/user /home/user/whatever /home/user/whatever1/whatever2 my PS1 should respectively... (12 Replies)
Discussion started by: ctsgnb
12 Replies

8. UNIX for Dummies Questions & Answers

Touch Challenge

I've been given a directory full of subdirectories full of logfiles of the same name: /logfiles/day1/file1/blockednodes.csv day1-14 file1-48 The above is the actual directory structure for 14 days worth of a logfile that is generated every 30 minutes. It's been done this way to preserve the... (15 Replies)
Discussion started by: Cludgie
15 Replies

9. 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

10. 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
ISCSI.CONF(5)						      BSD File Formats Manual						     ISCSI.CONF(5)

NAME
iscsi.conf -- iSCSI initiator configuration file DESCRIPTION
The file iscsi.conf, is used by the iscsictl(8) and iscontrol(8) utilities. It contains declarations and parameter/key-options. The syntax is very simple, variable = value; and they can be grouped via a block declaration: # this is a comment target_1 { # nickname variable = value; ... } # this must be on a line by itself. The following are specified in the iSCSI RFC 3720, for a full description see sections 11/12 of the RFC. AuthMethod currently only supported authentication method is CHAP, with digest either MD5 or SHA. Default is none. HeaderDigest a digest is calculated on the header of all iSCSI PDUs, and checked. Only CRC32C is implemented. Default is none. DataDigest same as for HeaderDigest, but on the data part of the iSCSI PDU. (not yet tested) TargetName is the name by which the target is known, not to be confused with target address, either obtained via the target administra- tor, or from a discovery session. InitiatorName if not specified, defaults to iqn.2005-01.il.ac.huji.cs: <hostname>. TargetAddress is of the form domainname[:port][,portal-group-tag] to quote the RFC: The domainname can be specified as either a DNS host name, a dotted-decimal IPv4 address, or a bracketed IPv6 address as specified in [RFC2732]. Note: portal-group-tag is unused at the moment. not implemented yet. MaxRecvDataSegmentLength the maximum data segment length in bytes it can receive in an iSCSI PDU, default is 8192. MaxOutstandingR2T is used to calculate/negotiate the tag opening, can be overridden by the tag option. SessionType either Discovery or Normal, default is Normal, see the -d flag of iscontrol. The following are not specified in the RFC 3720 offload Name of selected iSCSI hardware offload driver. port The iSCSI port used by the iSCSI protocol, defaults to 3260. tags Sets the tag opening to the value specified. maxluns overrides the compiled value of luns, see iscsi_initiator(4). This value can only be reduced. sockbufsize sets the receiver and transmitter socket buffer size to size, in kilobytes. The default is 128. If AuthMethod is set to CHAP, then the following must also be set: chapSecret this shared-secret. Can be either an ASCII string (e.g. hello world), a hex string (e.g 0xababcd0987654321...), or base64 string (eg 0b...) chapIName the chap-name, defaults to hostname. chapDigest can be MD5 or SHA1. tgtChapName/tgtChapSecret name and secret used for mutual CHAP; by default, mutual CHAP is not used. FILES
/etc/iscsi.conf EXAMPLES
# # Globals # port = 3260 # myiscsi { # nickname targetaddress = iscsi1 targetname = iqn.1900.com.com:sn.123456 } chaptest { targetaddress= 10.0.0.1; targetname = iqn.1900.com.com:sn.123456 initiatorname= iqn.2005-01.il.ac.huji.cs:nobody authmethod = CHAP; chapDigest = SHA1; chapsecret = 0x3713c3336d9a224c2791c873d3d2b174 tags = 256 } SEE ALSO
iscsi_initiator(4), iscontrol(8), iscsictl(8) STANDARDS
ISCSI RFC 3720 BUGS
Some options have not been implemented, either they were found to be unnecessary, or not understood, this can change in the future. The tags opening value is difficult to calculate, use wisely. BSD
February 4, 2015 BSD
All times are GMT -4. The time now is 03:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy