Sponsored Content
Full Discussion: Help with documentation
Top Forums Shell Programming and Scripting Help with documentation Post 302518464 by vgersh99 on Friday 29th of April 2011 05:50:39 PM
Old 04-29-2011
Code:
#!/bin/ksh

Lst='n02-z30-3x2drw-run1.log n02-z30-3x2drw-run2.log n02-z30-3x2drw-run3.log n02-z50-3x2drw-run1.log n02-z50-3x2drw-run2.log'

echo $Lst | nawk '{match($0,".*-");a[substr($0,1,RSTART+RLENGTH)]}END {for(i in a) print i}' RS=' '

 

8 More Discussions You Might Find Interesting

1. Programming

AIX 3.2.5 Documentation

I'm looking for books or online documentation for writing device drivers for AIX 3.2.5. I've searched IBM's website and google and come up with next to nothing. There is plenty of information for 4.1 and above but virtually nothing for 3.2.5. I'm specifically interested in porting one of the... (2 Replies)
Discussion started by: cejoe
2 Replies

2. UNIX for Advanced & Expert Users

df command documentation

how can i find a comprehensive documentation about df command of unix? (more detailed than unix man pages) (2 Replies)
Discussion started by: gfhgfnhhn
2 Replies

3. UNIX for Advanced & Expert Users

xargs documentation or tutorial?

Can anybody please forward me a good xargs documentation or tutorial? - $nilesh (5 Replies)
Discussion started by: ynilesh
5 Replies

4. Solaris

Help with SunOS 5.8 documentation ?

Hi all. I have machine with SUN OS 5.8 but i don't have any documentation about that. where i can found any documentation about this OS? I have look in the sticky thread about Solaris in this forum, but can't found for the SUN OS 5.8. it's same with Solaris 10 or have major difference with... (4 Replies)
Discussion started by: urangkayo
4 Replies

5. Solaris

need LDAP documentation

Dear Members, 1- i need good documentation for LDAP installation, configuration 2- you recommeddation using LDAP under linux or solaris which is more easy for administration 3- is that possible to make integration between and LDAP and any email server like qmail (like windows active directory... (3 Replies)
Discussion started by: hosney00ux
3 Replies

6. Programming

libxml2 documentation

i need to read/write a xml file in c i found libxml2, but the documentation is awfull, im using google but i get most of vb, or c# results can anyone point me to a introduction tutorial? actually, any kind of documentation would be ok (just not the oficial The XML C parser and toolkit... (2 Replies)
Discussion started by: broli
2 Replies

7. HP-UX

HP-UX 10.20 Documentation

I'm trying to find the 10.20 documentation online. I found some stuff at g4u0420c.houston.hp.com but these are pretty poor scans some of them being almost unreadable - for example: http://g4u0420c.houston.hp.com/en/B1171-90076/B1171-90076.pdf which is a scan of a DRAFT version of the X... (9 Replies)
Discussion started by: perdrix
9 Replies

8. HP-UX

Need HP unix documentation for beginner

Hello All, I am working in HP unix since 5 years on application and support. But in order to get opportunity out side i need to learn admintration Can somebody help me to guide hot start for this. Do we have any doc(pdf) to start with. Thanks Krsnadasa (1 Reply)
Discussion started by: krsnadasa
1 Replies
Mojo::Log(3pm)						User Contributed Perl Documentation					    Mojo::Log(3pm)

NAME
Mojo::Log - Simple logger SYNOPSIS
use Mojo::Log; # Log to STDERR my $log = Mojo::Log->new; # Customize log file location and minimum log level my $log = Mojo::Log->new(path => '/var/log/mojo.log', level => 'warn'); # Log messages $log->debug("Why isn't this working?"); $log->info("FYI: it happened again"); $log->warn("This might be a problem"); $log->error("Garden variety error"); $log->fatal("Boom!"); DESCRIPTION
Mojo::Log is a simple logger for Mojo projects. EVENTS
Mojo::Log can emit the following events. "message" $log->on(message => sub { my ($log, $level, @messages) = @_; ... }); Emitted when a new message gets logged. $log->unsubscribe('message'); $log->on(message => sub { my ($log, $level, @messages) = @_; say "$level: ", @messages; }); ATTRIBUTES
Mojo::Log implements the following attributes. "handle" my $handle = $log->handle; $log = $log->handle(IO::Handle->new); Log file handle used by default "message" event, defaults to opening "path" or "STDERR". "level" my $level = $log->level; $log = $log->level('debug'); Active log level, defaults to the value of the "MOJO_LOG_LEVEL" environment variable or "debug". These levels are currently available: "debug" "info" "warn" "error" "fatal" "path" my $path = $log->path $log = $log->path('/var/log/mojo.log'); Log file path used by "handle". METHODS
Mojo::Log inherits all methods from Mojo::EventEmitter and implements the following new ones. "new" my $log = Mojo::Log->new; Construct a new Mojo::Log object and subscribe to "message" event with default logger. "debug" $log = $log->debug('You screwed up, but that is ok'); Log debug message. "error" $log = $log->error('You really screwed up this time'); Log error message. "fatal" $log = $log->fatal('Its over...'); Log fatal message. "format" my $message = $log->format('debug', 'Hi there!'); my $message = $log->format('debug', 'Hi', 'there!'); Format log message. "info" $log = $log->info('You are bad, but you prolly know already'); Log info message. "is_level" my $success = $log->is_level('debug'); Check log level. "is_debug" my $success = $log->is_debug; Check for debug log level. "is_error" my $success = $log->is_error; Check for error log level. "is_fatal" my $success = $log->is_fatal; Check for fatal log level. "is_info" my $success = $log->is_info; Check for info log level. "is_warn" my $success = $log->is_warn; Check for warn log level. "log" $log = $log->log(debug => 'This should work'); Emit "message" event. "warn" $log = $log->warn('Dont do that Dave...'); Log warn message. SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>. perl v5.14.2 2012-09-05 Mojo::Log(3pm)
All times are GMT -4. The time now is 05:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy