Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Question: Help need to remove blank line & sed: Couldn't re-allocate memory error. Post 302345394 by senthil.ak on Wednesday 19th of August 2009 06:46:51 AM
Old 08-19-2009
Franklin, could you please explain me the awk statement, cause the command is taking almost 99 % of CPU when i executed

Code:
$  ps -aux| grep 9919
sayyavu    9919 99.9  0.5 34768 22672 pts/5   R    03:22   3:07 awk -v Y= ?$0 ~ Y

also here is the sample of trace.log which will help you in finding the solution.
Code:
7811  CMA: 08/19/2009 03:30:54   UserValidationFilter.validateUser 
7811  CMA: 08/19/2009 03:30:54   UserValidationFilter.getCookieValue entry
7811  CMA: 08/19/2009 03:30:54   UserValidationFilter.getCookieValue exit
7811  CMA: 08/19/2009 03:30:54   UserValidationFilter.validateUser 
7811  CMA: 08/19/2009 03:30:54   UserValidationFilter.validateUser Current Session is Not New
7811  CMA: 08/19/2009 03:30:54   UserValidationFilter.validateUser Session Id from SSO null
7811  CMA: 08/19/2009 03:30:54   UserValidationFilter.validateUser Before sm_universalid
7811  CMA: 08/19/2009 03:30:54   UserValidationFilter.validateUser After sm_universalid
7811  CMA: 08/19/2009 03:30:54   UserValidationFilter.validateUser exit
6332  PrePr: 08/19/2009 03:30:54   ValidateUserRequestProcessor.processPreprocess entry
6332  PrePr: 08/19/2009 03:30:54   ValidateUserRequestProcessor.getGuid

The bold letter which i want to grep so i am using the sed with year then hour.

Code:
sed -n "/$year 05:/,/$year 17:/p" trace.log

Regards,
senthil.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove blank line - SED

HI, I have this list of apps like so: DivX Products.app DivX Support.app Uninstall DivX for Mac.app Build Applet.app SpringBoard.app Interface.app MobileAddressBook.app MobileSafari.app MobileSlideShow.app Preferences.app Install Flash Player 8 OSX.app Yap.app check_afp.app ... (10 Replies)
Discussion started by: pcwiz
10 Replies

2. UNIX for Dummies Questions & Answers

Newbie help with New Line & Blank Line

I have this in my script: usercount=`ldapsearch -L -b"ou=people,ou=$ou,dc=paisleyhosting,dc=com" -h"$server" -p"1391" cn=* nothing | grep -c dn` admincount=`ldapsearch -b"ou=groups,ou=$ou,dc=paisleyhosting,dc=com" -h"$server" -p"1391" cn=USERADMIN* uniquemember | grep... (5 Replies)
Discussion started by: kthatch
5 Replies

3. Shell Programming and Scripting

Remove last blank line of file

I have a number of files (arranged in directories) which have last line blank, I am trying to synchronize my code with other env and due to this blank lines, all files error out as different although only difference is that of balnk line at end of file. Is there a way I can recursively... (2 Replies)
Discussion started by: ruchimca
2 Replies

4. Shell Programming and Scripting

Perl & Sed command -- Out of Memory Error

Experts, We used to receive our source files with '~^' as row delimiter. This file contains 2500K records and two of the columns having value in HTML formats within the file. While running the below commands against the file, we are encountering out of memory, could you please help to... (3 Replies)
Discussion started by: srivijay81
3 Replies

5. Shell Programming and Scripting

Error PHP Fatal error: Allowed memory size of 67108864 bytes exhausted(tried to allocate 401 bytes)

While running script I am getting an error like Few lines in data are not being processed. After googling it I came to know that adding such line would give some memory to it ini_set("memory_limit","64M"); my input file size is 1 GB. Is that memory limit is based on RAM we have on... (1 Reply)
Discussion started by: elamurugu
1 Replies

6. Shell Programming and Scripting

"Cannot allocate memory" error when run from script

hi in my application there is a line with open(/dev/mydevice,0); it work good when it run manually, but when try to run it within script /////////////////////////////////////////// #!/bin/sh ./device_test 0 0 0 1 1 1 0 0 1 ///////////////////////////////////////// I receive 'Failed... (3 Replies)
Discussion started by: majeed
3 Replies

7. Shell Programming and Scripting

Print lines between a regExp & a blank line

Hi, I have a file, say files_list, as below (o/p of ls -R cmd) $ cat files_list /remote/dir/path/to/file: sub-dir1 sub-dir2 sub-dir3 ... /remote/dir/path/to/file/sub-dir1: remote_file1.csv.tgz <blank line 1> /remote/dir/path/to/file/sub-dir2: remote_file2.csv.tgz <blank... (3 Replies)
Discussion started by: dips_ag
3 Replies

8. Shell Programming and Scripting

How to remove blank line from a text file?

Hi All, I am creating a text file using perl. The first record I am writing as "$line" and all the other as "\n$line". At the end the file is having N number of lines. I am using this file for MLOAD (Teradata), which is reading N+1 lines in the file and failing.I am not able to find new line... (2 Replies)
Discussion started by: unankix
2 Replies

9. Shell Programming and Scripting

'Couldn't read file' error in bash script with expect, sed and awk!

Ok, so I have a bash script with an embedded expect statement. Inside of the expect statement, i'm trying to pull all of the non-comment lines from the /etc/oratab file one at a time. Here's my command: cat /etc/oratab |sed /^s*#/d\ | awk 'NR==1'|awk -F: '{print \"$1\"}'|. oraenv Now,... (0 Replies)
Discussion started by: alexdglover
0 Replies

10. Shell Programming and Scripting

Bash - sed - Remove first word from line which can begin eventually with blank

hello. How to remove first word from line. The line may or may not start with blank. NEW_PARAM1=$(magic-command " -t --protocol=TCP -P 12345-u root -h localhost ") NEW_PARAM2=$(magic-command "-t --protocol=TCP -P 12345 -u root -h localhost ") I want NEW_PARAM1 equal to NEW_PARAM2 equal ... (2 Replies)
Discussion started by: jcdole
2 Replies
gdcmtar(1)							       GDCM								gdcmtar(1)

NAME
gdcmtar - Concatenate/Extract DICOM files. SYNOPSIS
gdcmtar [options] file-in file-out DESCRIPTION
The gdcmtar is a command line tool used to tar/untar multi-frames images (including SIEMENS MOSAIC file) PARAMETERS
file-in DICOM input filename file-out DICOM output filename options options --enhance enhance (default) -U --unenhance unenhance -M --mosaic Split SIEMENS Mosaic image into multiple frames. -p --pattern Specify trailing file pattern. --root-uid Root UID. general options -h --help print this help text and exit -v --version print version information and exit -V --verbose verbose mode (warning+error). -W --warning warning mode, print warning information -E --error error mode, print error information -D --debug debug mode, print debug information environment variable GDCM_ROOT_UID Root UID Typical usage SIEMENS Mosaic $ gdcminfo MR-sonata-3D-as-Tile.dcm MediaStorage is 1.2.840.10008.5.1.4.1.1.4 [MR Image Storage] TransferSyntax is 1.2.840.10008.1.2.1 [Explicit VR Little Endian] NumberOfDimensions: 2 Dimensions: (384,384,1) ... $ gdcmtar --mosaic -i MR-sonata-3D-as-Tile.dcm -o mosaic --pattern %03d.dcm Will output: -rw-r--r-- 1 mathieu mathieu 72882 2009-08-10 11:14 mosaic000.dcm -rw-r--r-- 1 mathieu mathieu 72886 2009-08-10 11:14 mosaic001.dcm -rw-r--r-- 1 mathieu mathieu 72886 2009-08-10 11:14 mosaic002.dcm -rw-r--r-- 1 mathieu mathieu 72886 2009-08-10 11:14 mosaic003.dcm -rw-r--r-- 1 mathieu mathieu 72886 2009-08-10 11:14 mosaic004.dcm -rw-r--r-- 1 mathieu mathieu 72886 2009-08-10 11:14 mosaic005.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic006.dcm -rw-r--r-- 1 mathieu mathieu 72882 2009-08-10 11:14 mosaic007.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic008.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic009.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic010.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic011.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic012.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic013.dcm -rw-r--r-- 1 mathieu mathieu 72882 2009-08-10 11:14 mosaic014.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic015.dcm -rw-r--r-- 1 mathieu mathieu 72882 2009-08-10 11:14 mosaic016.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic017.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic018.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic019.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic020.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic021.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic022.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic023.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic024.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic025.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic026.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic027.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic028.dcm -rw-r--r-- 1 mathieu mathieu 72884 2009-08-10 11:14 mosaic029.dcm -rw-r--r-- 1 mathieu mathieu 72882 2009-08-10 11:14 mosaic030.dcm $ gdcminfo mosaic000.dcm MediaStorage is 1.2.840.10008.5.1.4.1.1.4 [MR Image Storage] TransferSyntax is 1.2.840.10008.1.2.1 [Explicit VR Little Endian] NumberOfDimensions: 2 Dimensions: (64,64,1) ... SEE ALSO
gdcmdump(1), gdcmraw(1), gdcminfo(1) COPYRIGHT
Copyright (c) 2006-2011 Mathieu Malaterre Version 2.2.0 Tue Feb 5 2013 gdcmtar(1)
All times are GMT -4. The time now is 12:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy