Sponsored Content
Top Forums Shell Programming and Scripting Script to remove line of text Post 302625211 by Corona688 on Tuesday 17th of April 2012 11:42:44 AM
Old 04-17-2012
More details please. What criteria is used to decide which row is to be deleted? You've told us what criteria to not use...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to remove FIRST Line of huge text file on Solaris

i need help..!!!! i have one big text file estimate data file size 50 - 100GB with 70 Mega Rows. on OS SUN Solaris version 8 How i can remove first line of the text file. Please suggest me for solutions. Thank you very much in advance:) (5 Replies)
Discussion started by: madoatz
5 Replies

2. Shell Programming and Scripting

sed to remove 1st two characters every line of text file

what is the sed command to remove the first two characters of every line of a text file? each line of the text file has the same amount of characters, and they are ALL NUMERIC. there are hundreds of lines though. for example, >cat file1.txt 10081551 10081599 10082234 10082259 20081134... (20 Replies)
Discussion started by: ajp7701
20 Replies

3. UNIX Desktop Questions & Answers

How to remove text in each line after hyphen?

Hi, I'm trying to do something relatively simple. I have a txt file that has the following kinds of lines (and many more lines): CP19 Oahu - Maunawili Falls CP20 Oahu - Maunawili Falls AG12 Oahu - Maunawili Falls CP22 Oahu - Maunawili Falls, Local area AG14 Oahu CP141 KZ102 Kauai -... (7 Replies)
Discussion started by: euspilapteryx
7 Replies

4. UNIX for Dummies Questions & Answers

Remove text in line

Hi, i have a text file with some links and i want to remove some characters from it. My text file is something like this: <p> <b> Arquivo CASC2270.09o transferido com sucesso. </b> </p><p> <b> Verificando CASC2270.09o ... </b> </p><p> <b> Iniciando processamento de CASC2270.09o ... </b>... (11 Replies)
Discussion started by: limadario
11 Replies

5. Shell Programming and Scripting

remove specified line from text

hi, I wish to move a specified line from a text file: ltoremove=5 #remove 5th line i=1 while read line ; do if ; then ... i=$(($i+1)) done < "txt.txt" how should this actually be done? is there a shorter faster way to do this? :wall: Thanks, Ted (2 Replies)
Discussion started by: ted_chou12
2 Replies

6. Shell Programming and Scripting

how to remove all text including 2 certain character in each line!

Hi I have a file which has aroun 200 line and it is like this: GROUP2-WDI">GROUP2-WDI GROUP3-WDI">GROUP3-WDI KL2P0508BC">KL2P0508BC KL2P0508BIT">KL2P0508BIT KL3P0506BC">KL3P0506BC KL3P0506BUS">KL3P0506BUS KLD1F0507DBT">KLD1F0507DBT KLD1F0507DIT">KLD1F0507DIT KLD1F0510DBT">KLD1F0510DBT... (3 Replies)
Discussion started by: digitalmahdi
3 Replies

7. Shell Programming and Scripting

[Help] Remove text line containing *

Hi everybody, I have a perl script that I used to collect traceroute data from some site. It create output on the text file. The problem is , some site usually timed out when it's being tracerouted. And it show * * * on the line. Here is the example hop list to www.example.com 192.168.3.1... (3 Replies)
Discussion started by: franzramadhan
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

How Select numbers from a line of text, and remove leading spaces?

I have a text file with a line of text that contains numbers and text formatted into groups. I need to extract the number that can be either 1,2 or 3 digits long. Then write it to a variable, but i need to remove any leading spaces in the number first. I can get the numbers out but how to remove... (12 Replies)
Discussion started by: kcpoole
12 Replies

10. Shell Programming and Scripting

sed to remove partial text in one line only

I have test.xml XML file like <Report account="123456" start_time="2014-09-08T00:00:00+00:00" end_time="2014-09-10T23:59:59+00:00" user="Dollar Tree" limit="1000000" more_sessions="some text "> <Session ......rest of xml............... I need output like <Report> <Session ......rest of... (3 Replies)
Discussion started by: kumars1331@gmai
3 Replies
PMDALOGGER(1)						      General Commands Manual						     PMDALOGGER(1)

NAME
pmdalogger - log file performance metrics domain agent (PMDA) SYNOPSIS
$PCP_PMDAS_DIR/logger/pmdalogger [-d domain] [-l logfile] [-m memory] [-s interval] [-U username] [configfile] DESCRIPTION
pmdalogger is a configurable log file monitoring Performance Metrics Domain Agent (PMDA). It can be seen as analagous to the -f option to tail(1) and converts each new log line into a performance event. It was the first PMDA to make extensive use of event metrics, which can be consumed by client tools like pmevent(1). The logger PMDA exports both event-style metrics reflecting timestamped event records for text logged to a file (or set of files or output from a process), as well as the more orthodox sample-style metrics such as event counts and throughput size values. The PMDA is configured via a configfile which contains one line for each source of events (file or process). This file is setup by the Install script described in the later section on ``INSTALLATION'' of the PMDA. A brief description of the pmdalogger command line options follows: -d It is absolutely crucial that the performance metrics domain number specified here is unique and consistent. That is, domain should be different for every PMDA on the one host, and the same domain number should be used for the same PMDA on all hosts. -l Location of the log file. By default, a log file named logger.log is written in the current directory of pmcd(1) when pmdalogger is started, i.e. $PCP_LOG_DIR/pmcd. If the log file cannot be created or is not writable, output is written to the standard error instead. -m Limit the physical memory used by the PMDA to buffer event records to maxsize bytes. As log events arrive at the PMDA, they must be buffered until individual client tools request the next batch since their previous batch of events. The default maximum is 2 megabytes. -s Sets the polling interval for detecting newly arrived log lines. Mirrors the same option from the tail(1) command. -U User account under which to run the agent. The default is the unprivileged "pcp" account in current versions of PCP, but in older versions the superuser account ("root") was used by default. INSTALLATION
If you want access to the names, help text and values for the logger performance metrics, do the following as root: # cd $PCP_PMDAS_DIR/logger # ./Install This is an interactive installation process which prompts for each log file path to be monitored (or command to be run), a metric instance name to identify it, and whether access should be restricted (refer to the -x option to pmevent(1) for further details). If you want to undo the installation, do the following as root: # cd $PCP_PMDAS_DIR/logger # ./Remove pmdalogger is launched by pmcd(1) and should never be executed directly. The Install and Remove scripts notify pmcd(1) when the agent is installed or removed. FILES
$PCP_PMCDCONF_PATH command line options used to launch pmdalogger $PCP_PMDAS_DIR/logger/logger.conf default configuration file for the logger metrics $PCP_PMDAS_DIR/logger/help default help text file for the logger metrics $PCP_PMDAS_DIR/logger/Install installation script for the pmdalogger agent $PCP_PMDAS_DIR/logger/Remove undo installation script for the pmdalogger agent $PCP_LOG_DIR/pmcd/logger.log default log file for error messages and other information from pmdalogger PCP ENVIRONMENT
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configura- tion file, as described in pcp.conf(5). SEE ALSO
PCPIntro(1), pmevent(1), pmcd(1), tail(1), pcp.conf(5) and pcp.env(5). Performance Co-Pilot PCP PMDALOGGER(1)
All times are GMT -4. The time now is 08:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy