Sponsored Content
Top Forums Shell Programming and Scripting Commands for Substring : HElp Post 302340268 by Pank10 on Monday 3rd of August 2009 06:21:41 AM
Old 08-03-2009
Commands for Substring : HElp

Hi,

To remove the date and time from the below data which is in a file abc.txt

29 Jul 2009 04:36:53,956 [ajp-0.0.0.0-8310-140] ERROR 1
29 Jul 2009 04:36:58,335 [ajp-0.0.0.0-8310-239] ERROR 2
29 Jul 2009 05:37:24,746 [ajp-0.0.0.0-8310-125] ERROR 3

I want the output as

ERROR 1
ERROR 2
ERROR 3


As, In the above data time have different seconds . I am not getting how to do that .

Kindly let me know how to do the same.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getting a substring

This is probably pretty simple butI'm not sure how to best go about it. If I have FILE="myBigLongFileName_1.xls" FILE_PREFIX=`echo $FILE| cut -d"." -f1` # that gives "myBigLongFileName_1" All i want to do now is chop the "_1" from the end of $FILE_PREFIX Any ideas anyone? (3 Replies)
Discussion started by: djkane
3 Replies

2. UNIX for Dummies Questions & Answers

ksh substring commands

I am trying to get various portions of strings in my script, but am getting a substitution error. I followed the syntax that was described when I goggled this, but I can't get anything to work. #! /bin/ksh/ hello="adklafk;afak" #hello=${hello:3} hello=${$hello:3} happy="hey" echo... (1 Reply)
Discussion started by: anderssl
1 Replies

3. Programming

code that reads commands from the standard i/p and executes the commands

Hello all, i've written a small piece of code that will read commands from standard input and executes the commands. Its working fine and is execting the commands well. Accepting arguments too. e.g #mkdir <name of the directory> The problem is that its not letting me change the directory i.e... (4 Replies)
Discussion started by: Phrozen Smoke
4 Replies

4. Shell Programming and Scripting

substring ??

I execute command on this file and it gives o/p like this. COMMAND $ fuser -f /clocal/sanjay/AccessMonitor /clocal/sanjay/AccessMonitor: 1368322c To truncate 'c', i used tr -dc "\n" but then it does't give 1368322 as O/P. Any help ?? (7 Replies)
Discussion started by: varungupta
7 Replies

5. Shell Programming and Scripting

Substring HELP!

Hi, I am trying to do something which I thought was very simple but still being a beginner, has proved not to be. Input: val1 val2 val3 val4 val5 val6 . . . etc Desired Output: Every row in which value of val6 is a number starting with 0.0 or contains a capital E. The input... (2 Replies)
Discussion started by: awknerd
2 Replies

6. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

7. UNIX for Dummies Questions & Answers

Need help with substring

I need to check the occurrence of one string within another. code ******************** if ;then do something done ******************** Thanks (7 Replies)
Discussion started by: w020637
7 Replies

8. Shell Programming and Scripting

Get the substring

Hi All, I have a ouput string likes 'u8wos' or 'u10acsd' or somthing else 'u{number}{any characters}'and I want to get the number behind the letter 'u' by bash shell. Thanks Damon (11 Replies)
Discussion started by: Damon_Qu
11 Replies

9. AIX

HACMP: difference between 'cl' commands and 'cli' commands

Hi all, I'm new in this forum. I'm looking for the difference between the HACMP commands with the prefix "cl" and "cli". The first type are under /usr/es/sbin/cluster/sbin directory and the second are under /usr/es/sbin/cluster/cspoc directory. I know that the first are called HACMP for AIX... (0 Replies)
Discussion started by: peppix
0 Replies

10. UNIX for Dummies Questions & Answers

Substring

Hi, My requirement is to get the substring and then remove special character. Ex I have data like T_SYSTEM_XXXXX_YYYY_ZZZ I want to get XXXXXYYYYZZZ the part after T_SYSTEM is varying it might be XXX_YY or just XX can you tell me which all commands i have to use. i understand i... (5 Replies)
Discussion started by: Mohammed_Tabish
5 Replies
Level(3)						User Contributed Perl Documentation						  Level(3)

NAME
Log::Log4perl::Level - Predefined log levels SYNOPSIS
use Log::Log4perl::Level; print $ERROR, " "; # -- or -- use Log::Log4perl qw(:levels); print $ERROR, " "; DESCRIPTION
"Log::Log4perl::Level" simply exports a predefined set of Log4perl log levels into the caller's name space. It is used internally by "Log::Log4perl". The following scalars are defined: $OFF $FATAL $ERROR $WARN $INFO $DEBUG $TRACE $ALL "Log::Log4perl" also exports these constants into the caller's namespace if you pull it in providing the ":levels" tag: use Log::Log4perl qw(:levels); This is the preferred way, there's usually no need to call "Log::Log4perl::Level" explicitely. The numerical values assigned to these constants are purely virtual, only used by Log::Log4perl internally and can change at any time, so please don't make any assumptions. If the caller wants to import these constants into a different namespace, it can be provided with the "use" command: use Log::Log4perl::Level qw(MyNameSpace); After this $MyNameSpace::ERROR, $MyNameSpace::INFO etc. will be defined accordingly. Numeric levels and Strings Level variables like $DEBUG or $WARN have numeric values that are internal to Log4perl. Transform them to strings that can be used in a Log4perl configuration file, use the c<to_level()> function provided by Log::Log4perl::Level: use Log::Log4perl qw(:easy); use Log::Log4perl::Level; # prints "DEBUG" print Log::Log4perl::Level::to_level( $DEBUG ), " "; To perform the reverse transformation, which takes a string like "DEBUG" and converts it into a constant like $DEBUG, use the to_priority() function: use Log::Log4perl qw(:easy); use Log::Log4perl::Level; my $numval = Log::Log4perl::Level::to_priority( "DEBUG" ); after which $numval could be used where a numerical value is required: Log::Log4perl->easy_init( $numval ); COPYRIGHT AND LICENSE
Copyright 2002-2009 by Mike Schilli <m@perlmeister.com> and Kevin Goess <cpan@goess.org>. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.1 2010-02-07 Level(3)
All times are GMT -4. The time now is 08:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy