Sponsored Content
Full Discussion: using sed to remove lines
Top Forums Shell Programming and Scripting using sed to remove lines Post 302442766 by BeefStu on Thursday 5th of August 2010 11:25:30 AM
Old 08-05-2010
Samething works for me too when I just run the sar command.

I am guessing some how when reading the file they maybe changing
the file descriptor to another number other than stdout or stderr. Could that confuse sed?

I guess I will post this in an IBM specific forum to verify.

If anybody with an AIX box can try my above-mentioned example I would
apprciate it, this will verify if its the sar command. BTW, I am running aix
version 5.3
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sed or Awk to remove specific lines

I have searched the forum for this - forgive me if I missed a previous post. I have the following file: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah alter table "informix".esc_acct add constraint (foreign key (fi_id) references "informix".fi ... (5 Replies)
Discussion started by: Shoeless_Mike
5 Replies

2. Shell Programming and Scripting

Using sed to remove lines where field is empty

I was just looking at this post: https://www.unix.com/shell-programming-scripting/22893-delete-multiple-empty-lines.html. and I am looking to achieve the same with sed. So the idea is to delete lines from a file where a certain field has no value. Inputfile: EMID MMDDYY HOURS JOB EMNAME 0241... (4 Replies)
Discussion started by: figaro
4 Replies

3. Shell Programming and Scripting

How to remove lines before and after with awk / sed ?

Hi guys, I need to remove the pattern (ID=180), one line before and four lines after. Thanks. (5 Replies)
Discussion started by: ashimada
5 Replies

4. Shell Programming and Scripting

What's the command to remove empty lines with sed?

3 10 20 10 100 100 10000 Output: 3 10 20 10 100 100 10000 ---------- Post updated at 07:59 AM ---------- Previous update was at 07:56 AM ---------- sed '/^$/d' file doesn't work. (8 Replies)
Discussion started by: cola
8 Replies

5. Shell Programming and Scripting

SED to remove a line above and lines below.

:confused:Hi All, I need help on removing lines in a text file. Sample file : When there is a match ip for IPAddress in my `cat ip.out`, proceed delete line above until string "Comp" is found. Thank you very much. ---------- Post updated at 12:56 AM ---------- Previous update was... (4 Replies)
Discussion started by: chiewming
4 Replies

6. Shell Programming and Scripting

grep/sed to remove lines in file

Hi, I have a file with values, file1: BELL-1180-1180-81|577:1017| BELL-1180-1180-81|jm10i-auto-stub1/577:102| BELL-1180-1180-81|jm10i-auto-stub1/577:101| BELL-1180-1180-81|jm10i-auto-stub1/577:1700| BELL-1180-1180-81|jm10i-auto-stub1/577:1699| I need to remove the lines which has... (9 Replies)
Discussion started by: giri_luck
9 Replies

7. Shell Programming and Scripting

Remove a range of lines from a file using sed

Hi I am having some issue editing a file in sed. What I want to do is, in a loop pass a variable to a sed command. Sed should then search a file for a line that matches that variable, then remove all lines below until it reaches a line starting with a constant. I have managed to write a... (14 Replies)
Discussion started by: Andy82
14 Replies

8. Shell Programming and Scripting

Locate and remove lines with sed

Gents, I would like to remove some lines from a big file ( file2). The objetive is to remove all the lines in file2 containing a certain string which are in file data2delete.. file data2delete contens: 2573.0 7260.01 2893.0 7255.01 2903.0 7245.01 2897.0 7255.01 2561.0 7255.01... (6 Replies)
Discussion started by: jiam912
6 Replies

9. UNIX for Dummies Questions & Answers

How to remove certain lines using sed?

Hi I have the following kind of line sin my file . print ' this is first'. print ' this is firs and next ' ' line continuous '. -- this is entire print line. print ' this is first and next ' ' line continuous and' 'still there now over'. -- this 3lines together a single print line. ... (5 Replies)
Discussion started by: Sivajee
5 Replies

10. Shell Programming and Scripting

How to remove certain lines using sed?

Hi, I am new to unix and i started some scripting recently. Please go through the following script i wrote. #!/bin/sh file='path../tfile' file1='path../tfile1' rmfile='path../test2' C1=1 C2=1 exec 3< $file1 while read LINE1; do read LINE2 <&3 a=$LINE1 b=`expr $LINE2 - 1` ... (1 Reply)
Discussion started by: Subbu123
1 Replies
ISAG(1) 						      System Activity Grapher							   ISAG(1)

NAME
isag - Interactive System Activity Grapher SYNOPSIS
isag [-p datafiles_path] [-c config_file] [-ght gr_height] [-gwd gr_width] DESCRIPTION
The isag command graphically displays the system activity data stored in a binary data file by a previous sar run. The isag command invokes sar to extract the data to be plotted. The data are processed using sar command and slightly transformed to tabular format, and then this format is visualized using gnuplot pro- gram. OPTIONS
-p datafiles_path Specify the pathname where are located the daily data files. Default path is: /var/log/sysstat -c config_file Specify the configuration file used by the isag command. The contents of this file may depend on isag version number. Default config file is: $HOME/.isag.cfg. -ght gr_height Specify the height of the chart area. Default value is: 400. -gwd gr_width Specify the width of the chart area. Default value is: 720. CONFIG FILE
As mentioned above there is a config file. There are stored following values: last showed graph y limits for each kind of graph It seems useful, because new run doesn't need new settings to obtain same scale. PREREQUSITIES
Here is list of prerequsities including versioning and built-in features. Tcl/Tk Version 8.0 or newer. gnuplot Gnuplot must have a tkcanvas display. AUTHOR
D. Doubrava 2000, 2002 e-mail: linux_monitor(at)volny(dot)cz HTTP Site: http://www.volny.cz/linux_monitor/isag/index.html SEE ALSO
sar (1), sadc (8). 3rd Berkeley Distribution 0.81.0 ISAG(1)
All times are GMT -4. The time now is 06:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy