Sponsored Content
Top Forums Shell Programming and Scripting Remove part of the file using a condition Post 302991319 by Scrutinizer on Thursday 9th of February 2017 04:36:17 AM
Old 02-09-2017
Try:
Code:
awk 'NF==56' FS='\n' RS= ORS='\n\n' file

This should work if there are empty lines between the records, like in your sample.
This User Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. HP-UX

How do I take out(remove) the date part in the file name?

Hi Guys here I am again, I have two files in a specified location. Location ex: /opt/xdm/input/ input file names: 1. abc_app.yyyymmdd.dtd 2. abd_app.yyyymmdd.dtd I need to build a code that reads the files from the location based on the oldest date and cuts the date part... (5 Replies)
Discussion started by: ruthless
5 Replies

2. Shell Programming and Scripting

remove certain part of file name

Hi, Is it possible to remove the first part of the file name using find. i.e i have something like 2006abc.txt , 1007bed.txt etc, I wanna rename them to abc.txt , bed.txt I tried some stupid way.. find . -name '*.txt' -exec mv {} `cut -f2-5 -d"_" {}` \; somehow iam not getting it. ... (3 Replies)
Discussion started by: braindrain
3 Replies

3. Shell Programming and Scripting

Remove part of the file

I have an xml file, from where I need to take out Application2 entries and keep the others. I need to remove from <product> to </product> and the key element to look for while removing should be <application> as other pairs can be same for others. <product> ... (10 Replies)
Discussion started by: chiru_h
10 Replies

4. UNIX and Linux Applications

how to get a part of file pertaining to a condition

A log file contains details for last one year .This file contains log for all dates . The log file for a particular day starts with a particular string and ends with the same string . We need to make a new file out of this existing file containing data after a particular date. (2 Replies)
Discussion started by: chaitanyassk
2 Replies

5. Shell Programming and Scripting

Remove part of a column in a text file

I have a text file with delimiter "|" and sometimes the zipcode is in "5th" column or "6th" column. I want to scan the file and remove the "-2323" from the zipcode which has zip+4 digits From blah|blah|foo|bar||blah|945523-232|USA blah|blah|foo|bar||blah|foo|94555-2323|USA To... (8 Replies)
Discussion started by: gubbu
8 Replies

6. UNIX for Dummies Questions & Answers

Remove part of file name with sed & mv

Ok, so I have bunch of files that are named "orange__file_name.asm" and I want to batch rename them to "file_name.asm" I know that using "ls | sed s/orange__//" will get rid of the part of the file name I do not want. But how do I combine that with the mv command to actually do it? Thanks JG (5 Replies)
Discussion started by: john galt
5 Replies

7. UNIX for Dummies Questions & Answers

[Solved] Rename file name / remove part of name

I have a whole file structure with jpeg files where I want to remove a part of the file name. An application added in many files a case conflict in the naming "xyz 017.jpg (Case Conflict 1)" So, can someone help me how to get rid of the " (Case Conflict 1)"? What I have is this: find . -name... (2 Replies)
Discussion started by: borobudur
2 Replies

8. Shell Programming and Scripting

Remove part of a file based on identifiers

here below is a part of the file cat fileName.txt NAME=APP-VA-va_mediaservices-113009-VA_MS_MEDIA_SERVER_NOT_PRESENT-S FIXED=false DATE= 2013-02-19 03:46:04.4 PRIORITY=HIGH RESOURCE NAME=ccm113 NAME=APP-DS-ds_ha-140020-databaseReplicationFailure-S FIXED=false DATE= 2013-02-19... (4 Replies)
Discussion started by: vivek d r
4 Replies

9. Shell Programming and Scripting

How to remove the date part of the file?

Hi Gurus, I have file name like: abcd.20131005.dat I need to remove mid part of data final name should be abcd.dat thanks in advance (2 Replies)
Discussion started by: ken6503
2 Replies

10. Shell Programming and Scripting

How do I take out(remove) the date part in the file name in a script?

Hi All, I need to create links between two directories. have multiple files in a specified location. Source Location ex: /opt/xdm/input/ Target Location ex: /opt/xdm input file names: 1. abc_app.aus.apac.yyyymmdd.dtd 2. abcd_app.aus.apac.yyyymmdd.dtd I need to build a code that reads... (1 Reply)
Discussion started by: kthri_82
1 Replies
SGEEQU(l)								 )								 SGEEQU(l)

NAME
SGEEQU - compute row and column scalings intended to equilibrate an M-by-N matrix A and reduce its condition number SYNOPSIS
SUBROUTINE SGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX, INFO ) INTEGER INFO, LDA, M, N REAL AMAX, COLCND, ROWCND REAL A( LDA, * ), C( * ), R( * ) PURPOSE
SGEEQU computes row and column scalings intended to equilibrate an M-by-N matrix A and reduce its condition number. R returns the row scale factors and C the column scale factors, chosen to try to make the largest element in each row and column of the matrix B with elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1. R(i) and C(j) are restricted to be between SMLNUM = smallest safe number and BIGNUM = largest safe number. Use of these scaling factors is not guaranteed to reduce the condition number of A but works well in practice. ARGUMENTS
M (input) INTEGER The number of rows of the matrix A. M >= 0. N (input) INTEGER The number of columns of the matrix A. N >= 0. A (input) REAL array, dimension (LDA,N) The M-by-N matrix whose equilibration factors are to be computed. LDA (input) INTEGER The leading dimension of the array A. LDA >= max(1,M). R (output) REAL array, dimension (M) If INFO = 0 or INFO > M, R contains the row scale factors for A. C (output) REAL array, dimension (N) If INFO = 0, C contains the column scale factors for A. ROWCND (output) REAL If INFO = 0 or INFO > M, ROWCND contains the ratio of the smallest R(i) to the largest R(i). If ROWCND >= 0.1 and AMAX is neither too large nor too small, it is not worth scaling by R. COLCND (output) REAL If INFO = 0, COLCND contains the ratio of the smallest C(i) to the largest C(i). If COLCND >= 0.1, it is not worth scaling by C. AMAX (output) REAL Absolute value of largest matrix element. If AMAX is very close to overflow or very close to underflow, the matrix should be scaled. INFO (output) INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value > 0: if INFO = i, and i is <= M: the i-th row of A is exactly zero > M: the (i-M)-th column of A is exactly zero LAPACK version 3.0 15 June 2000 SGEEQU(l)
All times are GMT -4. The time now is 08:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy