Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Help with deleting some parts from text file Post 302650171 by Scrutinizer on Friday 1st of June 2012 06:00:22 PM
Old 06-01-2012
Hi, it is a "range pattern" consisting of two regexes, /HOME.*(/ and /^)/.
This User Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Deleting text from a file

Hi, In my korn shell script, I want to delete some particular text from a certain file...How can this be done? Is the below right? ed $NAMES << EOF echo "" > /dev/null echo "${x} = " > /dev/null echo "name = " > /dev/null echo "adress = " > /dev/null w q EOF (1 Reply)
Discussion started by: n8575
1 Replies

2. Shell Programming and Scripting

Deleting text block in file

Need to delete a text block inside a file, that is marked with a start and an end pattern. Eg do not delete not delete <tag1> delete everything here here and here and here... <tag2> do not delete do not delete.... Believe sed is able to do this job but don't get it working. ... (1 Reply)
Discussion started by: andre123
1 Replies

3. UNIX for Dummies Questions & Answers

Deleting lines in text file

Hi everyone, I have text files that I want to delete lines from. I have searched through this forum for quite some time and found examples of both awk and sed. Unfortunately, I was not able to successfully do what I want. Well to some extent. I did manage to delete the first 15 lines from each... (5 Replies)
Discussion started by: hern14
5 Replies

4. Shell Programming and Scripting

deleting certain parts of a line in perl

I have a filr data.txt. Its contents are Available labels (* indicates activated, I indicates installed, R idicates running): abc-3.0.3 def-3.0.4 xyz-3.1.2-1.0 I want to delete " Available labels (* indicates activated, I indicates installed, R idicates running):" and... (3 Replies)
Discussion started by: lassimanji
3 Replies

5. Shell Programming and Scripting

How can i break a text file into parts that occur between a specific pattern

How can i break a text file into parts that occur between a specific pattern? I have text file having various xml many tags like which starts with the tag "<?xml version="1.0" encoding="utf-8"?>" . I have to break the whole file into several xmls by looking for the above pattern. All the... (9 Replies)
Discussion started by: abhinav192
9 Replies

6. UNIX for Dummies Questions & Answers

Deleting all instances of a certain character from a text file

In my command prompt I did: sed 's/\://' mytextfile > newtextfile But it only deleted the first instance of : in each line when some lines have multiple : appearing in each one. How can I delete all the : from the entire file? (1 Reply)
Discussion started by: guitarscn
1 Replies

7. UNIX for Dummies Questions & Answers

Help with deleting characters from text file

I have a text file that looks like this: I want to delete the last character of first column in all rows so that my output looks like this: Thanks a lot! (1 Reply)
Discussion started by: evelibertine
1 Replies

8. UNIX for Dummies Questions & Answers

Deleting specific rows from a text file

How do I go about deleting specific rows from a text file (given row number)? (5 Replies)
Discussion started by: evelibertine
5 Replies

9. UNIX for Dummies Questions & Answers

Deleting Block of Text from a File

Hi I am looking for the way to delete the block of data for example original file line1 line2 line3 line4 line5 input file line2 line3 original file should contain line1 line4 line5 (3 Replies)
Discussion started by: rakeshkumar
3 Replies

10. Shell Programming and Scripting

How to remove answers and explanation parts from a text file with lots of questions.?

Hi, I have a text file with thousands of questions in it. Each question (multiple lines) with multiple choice options, Answer and Explanation (optional). I need to delete Answer & explanation parts for all Questions and insert a blank line before net question. Each question starts with NO. I... (4 Replies)
Discussion started by: prvnrk
4 Replies
Regexp::Common::SEN(3)					User Contributed Perl Documentation				    Regexp::Common::SEN(3)

NAME
Regexp::Common::SEN -- provide regexes for Social-Economical Numbers. SYNOPSIS
use Regexp::Common qw /SEN/; while (<>) { /^$RE{SEN}{USA}{SSN}$/ and print "Social Security Number "; } DESCRIPTION
Please consult the manual of Regexp::Common for a general description of the works of this interface. Do not use this module directly, but load it via Regexp::Common. $RE{SEN}{USA}{SSN}{-sep} Returns a pattern that matches an American Social Security Number (SSN). SSNs consist of three groups of numbers, separated by a hypen ("-"). This pattern only checks for a valid structure, that is, it validates whether a number is valid SSN, was a valid SSN, or maybe a valid SSN in the future. There are almost a billion possible SSNs, and about 400 million are in use, or have been in use. If "-sep=P" is specified, the pattern P is used as the separator between the groups of numbers. Under "-keep" (see Regexp::Common): $1 captures the entire SSN. $2 captures the first group of digits (the area number). $3 captures the second group of digits (the group number). $4 captures the third group of digits (the serial number). SEE ALSO
Regexp::Common for a general description of how to use this interface. AUTHORS
Damian Conway and Abigail. MAINTAINANCE
This package is maintained by Abigail (regexp-common@abigail.be). BUGS AND IRRITATIONS
Bound to be plenty. For a start, there are many common regexes missing. Send them in to regexp-common@abigail.be. LICENSE and COPYRIGHT This software is Copyright (c) 2001 - 2009, Damian Conway and Abigail. This module is free software, and maybe used under any of the following licenses: 1) The Perl Artistic License. See the file COPYRIGHT.AL. 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2. 3) The BSD Licence. See the file COPYRIGHT.BSD. 4) The MIT Licence. See the file COPYRIGHT.MIT. perl v5.16.2 2010-02-23 Regexp::Common::SEN(3)
All times are GMT -4. The time now is 12:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy