Sponsored Content
Top Forums Shell Programming and Scripting script to delete lines from a txt file if pattern matches Post 302504455 by ajiwww on Monday 14th of March 2011 04:11:36 PM
Old 03-14-2011
thank you so much man, so kind if yo...Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to select lines in unix matches a pattern at a particular position

I have huge file. I want to copy the lines which have first character as 2 or 7, and also which has fist two characters as 90. I need only these records from file. How I can acheive this. Can somebody help me..... (2 Replies)
Discussion started by: cs_banda
2 Replies

2. Shell Programming and Scripting

sed delete pattern skipping first n lines of file.

I have files of more than 10K lines that I need to delete lines that contain a pattern, but I want to keep the first few lines intact. Can this be done with sed? (7 Replies)
Discussion started by: tkg
7 Replies

3. Shell Programming and Scripting

delete lines in file matching a pattern

I have a text file, a sample of which is as follows: r/- * 0: WINDOWS/Microsoft.NET/Framework/v2.0.50727/ASP.NETWebAdminFiles/Images/headerGRADIENT_Tall.gif r/- * 0: WINDOWS/SoftwareDistribution/Download/cf8ec753e88561d2ddb53e183dc05c3e/backoff.jpg r/- * 0: ... (2 Replies)
Discussion started by: stumpyuk
2 Replies

4. Shell Programming and Scripting

Displaying lines of a file where the second field matches a pattern

Howdy. I know this is most likely possible using sed or awk or grep, most likely a combination of them together, but how would one go about running a grep like command on a file where you only try to match your pattern to the second field in a line, space delimited? Example: You are... (3 Replies)
Discussion started by: LordJezoX
3 Replies

5. Shell Programming and Scripting

Merge lines from one file if pattern matches

I have one comma separated file (a.txt) with two or more records all matching except for the last column. I would like to merge all matching lines into one and consolidate the last column, separated by ":". Does anyone know of a way to do this easily? I've searched the forum but most talked... (6 Replies)
Discussion started by: giannicello
6 Replies

6. Shell Programming and Scripting

Merge lines if pattern matches in ksh

I have a file like this. Pls help me to solve this . (I should look for only Message : 111 and need to print the start time to end time Need to ignore other type of messages. Ex: if first message is 111 and second message is 000 or anything else then ignore the 2nd one and print start time of the... (1 Reply)
Discussion started by: mnjx
1 Replies

7. Shell Programming and Scripting

how to delete lines from a file which starts with a specific pattern

I need to delete those lines from a file, which starts with 45. How to do it? (3 Replies)
Discussion started by: mady135
3 Replies

8. Shell Programming and Scripting

NAWK to remove lines that matches a specific pattern

Hi, I have requirement that I need to split my input file into two files based on a search pattern "abc" For eg. my input file has below content abc defgh zyx I need file 1 with abc and file2 with defgh zyx I can use grep command to acheive this. But with grep I need... (8 Replies)
Discussion started by: sbhuvana20
8 Replies

9. Shell Programming and Scripting

copy, then delete lines in file with sed using a pattern

I need to copy lines to a new file from files with sed using a pattern in char postions 1-3. Then after the copy, I need to delete those same lines from the input files. For example, string "ABC" in pos 1-3 (6 Replies)
Discussion started by: laksjfhoius9123
6 Replies

10. Shell Programming and Scripting

How Not to Delete Words that matches a PATTERN

Hi, I have a test file name test.txt with its contents string 21345 qwee strinn strriin striin i need to delete all the words except the word STRING I used the command cat test.txt | sed 's/^..*$/**/g' but the output entries still contain strinn strriin striin. Plz Help me out.... (5 Replies)
Discussion started by: Ananth12
5 Replies
J0(3)							     Linux Programmer's Manual							     J0(3)

NAME
j0, j0f, j0l, j1, j1f, j1l, jn, jnf, jnl - Bessel functions of the first kind SYNOPSIS
#include <math.h> double j0(double x); double j1(double x); double jn(int n, double x); float j0f(float x); float j1f(float x); float jnf(int n, float x); long double j0l(long double x); long double j1l(long double x); long double jnl(int n, long double x); Link with -lm. Feature Test Macro Requirements for glibc (see feature_test_macros(7)): j0(), j1(), jn(): _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE j0f(), j0l(), j1f(), j1l(), jnf(), jnl(): _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE >= 600 || DESCRIPTION
The j0() and j1() functions return Bessel functions of x of the first kind of orders 0 and 1, respectively. The jn() function returns the Bessel function of x of the first kind of order n. The j0f() etc. and j0l() etc. functions are versions that take and return float and long double values, respectively. RETURN VALUE
On success, these functions return the appropriate Bessel value of the first kind for x. If x is a NaN, a NaN is returned. If x is too large in magnitude, or the result underflows, a range error occurs, and the return value is 0. ERRORS
See math_error(7) for information on how to determine whether an error has occurred when calling these functions. The following errors can occur: Range error: result underflow, or x is too large in magnitude errno is set to ERANGE. These functions do not raise exceptions for fetestexcept(3). CONFORMING TO
The functions returning double conform to SVr4, 4.3BSD, POSIX.1-2001. The others are nonstandard functions that also exist on the BSDs. BUGS
There are errors of up to 2e-16 in the values returned by j0(), j1() and jn() for values of x between -8 and 8. SEE ALSO
y0(3) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. 2010-09-20 J0(3)
All times are GMT -4. The time now is 07:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy