You mean you want to delete the link, defined between '<a href' and '</a>' tags, right? Use sed's 's' command (substitute)
Here:
The exclamation marks are delimiters, and any char will do, as long as there is exactly three of them there.
Beware, however, that pattern matching is greedy; so if you happen to have more links on one line, it will eat up everything between the first '<a href' and the last '</a>':
OK, so for a grand overview of what I'm trying to do:
I've got 2 files that are mostly like.
The file format is:
data
data
data
data
data
data
data
data
data
data (2 Replies)
Hi,
I am trying to get all the log entries in a log file based on start and end times,
I have tried to use the following but couldnt get the desired output:
sed -n '/start/,/end/ p' file
&
newtime=`echo "$time" | cut -d -start | cut -d" " -start`
Kindly help me,
Thanks (0 Replies)
Hi guys, trying to replace a '#' with a ' ' (space) but only between the brackets '(' and ')'
N="text1#text2#text3(var1#var2#var3)"
N=`echo $N |sed '/(/,/) s/#. //'`
echo $N
Looking for an output of "text1#text2#text3(var1 var2 var3)"
Any ideas? (15 Replies)
Hi,
i need to delete a lines after searching a particular string but this searching should only happen after the 4th line..
basically imagine a file like this
From: abcd.yahoo.com
To: cdeb.yahoo.com
Subject: hi all
sdfsd
sadasd
asdasd
dfsdf
From: abcd.yahoo.com
To:... (3 Replies)
Hi
I am having some problom deleting the lines between two specific lines in a file. need to delete lines between two closest lines. i.e need to find the closest range or pattern in a file with repeating patterns.
Sample Input:
WARNING
<some text in n number of lines>
ERROR:2597... (10 Replies)
Hello. Newbie here....
I basically have a directory with tens of thousands (literally) subdirectories and need to delete those that are older than 2008 (hundreds) with all their contents. I've looked through all the RM parameters and still can't quite figure out how to specify the data range... (7 Replies)
Hi all,
Is there a way to use the sed command to get the second range?
For instance:
sample.dat:
-------------
11111
22222
33333
44444
-------------
using "sed -n '/^ping/,/^$/p' sample.dat can get the first 2 lines.
But is there a way to get the first 4 lines, from... (4 Replies)
Hi All,
I have a file which contains lakhs of records
0136812368126 03000 Statement
1237129372189 02321 JIT
0136812368126 05000 terminal
1237129372189 05001 Utilise
Is there an option to delete all lines which fall within the range 05000 to 05999?
I tried... (6 Replies)
I want to delete row in csv file , which row value from 2009-10-01 to 2011-06-03 using script.my csv row data look like:
2009-10-01
2011-03-30
2011-03-31
2011-04-01
2011-06-03
2011-06-30
2011-07-01
2011-09-28 ... (7 Replies)
Hi Guys
I am looking for a solution to one problem to remove parentheses in a range of lines.
Input file
module bist_logic_inst(a, ab , dhd, dhdh , djdj, hdh, djjd, jdj, dhd, dhp, dk
);
input a;
input ab;
input dhd;
input djdj;
input dhd;
output hdh;
output djjd;
output jdj;... (5 Replies)
Discussion started by: kshitij
5 Replies
LEARN ABOUT ULTRIX
ln
ln(1) General Commands Manual ln(1)Name
ln - link to a file
Syntax
ln [ -f ] [ -i ] [ -s ] name1 [name2]
ln [ -f ] [ -i ] [ -s ] name ... directory
Description
A link is a directory entry referring to a file. A file, together with its size and all its protection information may have several links
to it. There are two kinds of links: hard links and symbolic links.
By default makes hard links. A hard link to a file is indistinguishable from the original directory entry. Any changes to a file are
effective independent of the name used to reference the file. Hard links may not span file systems and may not refer to directories.
Given one or two arguments, creates a link to an existing file name1. If name2 is given, the link has that name. The name2 may also be a
directory in which to place the link. Otherwise it is placed in the current directory. If only the directory is specified, the link is
made to the last component of name1.
Given more than two arguments, makes links to all the named files in the named directory. The links made have the same name as the files
being linked to.
Options-f Forces existing destination pathnames to be removed before linking without prompting for confirmation.
-i Write a prompt to standard output requesting information for each link that would overwrite an existing file. If the response from
standard input is affirmative, and if permissions allow, the link is done. The -i option has this effect even if the standard input is
not a terminal.
-s Creates a symbolic link.
A symbolic link contains the name of the file to which it is linked. The referenced file is used when an operation is performed on
the link. A on a symbolic link returns the linked-to file. An must be done to obtain information about the link. The call may be
used to read the contents of a symbolic link. Symbolic links may span file systems and may refer to directories.
See Alsocp(1), mv(1), rm(1), link(2), readlink(2), stat(2), symlink(2)ln(1)