Thanks Frank. It removes contents in all the occurrence of <script> and </script> tag. It removes the content in the complete line where the above tags are present.
Could you please help me to remove the content which are between those tags instead of removing everything in a line.
Example:
*Below is the output that i get when i execute your command
input file content:
client side<script>java script</script>java scripting is.......
server side<scipt>classic asp</script>ASP is a microsoft technology.......
satheesh here
output:
satheesh here
But i want the output as:
client side java scripting is.......
server side ASP is a microsoft technology.......
---------- Post updated at 09:28 AM ---------- Previous update was at 09:24 AM ----------
Quote:
Originally Posted by jville
looks like it's deleting from the begining of the line where the <script> and </script> are located.
test.file
when I execute the script
awk '/<script>/{p=1} /<\/script>/{p=0; next}!p' test.file
I get
I am assuming Mr satheeshkumar want is
Thanks.
You are correct jville. Thats what i need exactly.
Hi,
i'd like to know if the following is possible with a shell script, and can't find the answer in the search.
Suppose i have a logfile build like this:
# 8 :riuyzp1028
# 38 : riuyzp1028
# 25 : riuyvzp1032
# 30 : nlkljpa0202
# 1 : nlklja0205
# 38 : riuyzp1028
# 25 :... (4 Replies)
Hello,
I got a Qstion. Im posting to a phpbb forum with bash and curl.. i have a text file with the following tags that i post to the forum:
$var1
$var2
$var3
How can i with sed or awk put var content from shell script between the ... in the... (7 Replies)
Hi. I'm hoping that someone can help me with a bash script to delete a block of lines from a file.
What I want to do is delete every line between two stings that are the same,
including the line the first string is on but not the second.
(Marked lines to match with !)
For example if I... (2 Replies)
Hi guys, I wonder if it's possible to search for a line containing 2 strings and delete that line and perhaps replace the source file with already deleted line(s).
What I mean is something like this:
sourcefile.txt
line1: something 122344 somethin2 24334 45554676
line2: another something... (6 Replies)
I have some text files in a folder f1 with 10 columns. The first five columns of a file are shown below.
aab abb 263-455 263 455
aab abb 263-455 263 455
aab abb 263-455 263 455
bbb abb 26-455 26 455
bbb abb 26-455 26 455
bbb aka 264-266 264 266
bga bga 230-232 230 ... (10 Replies)
I need that a certain part of the content below excluded
==Image Gallery== followed by <gallery> and the content until </gallery>
test SED1
==Image Gallery==
<gallery>
Image:car1.jpg| Car 1<sup>1</sup>
Imagem: car2.jpg| Car2<sup>2</sup>
</gallery> test SED2
==Image... (5 Replies)
Hi all,
i have the following line in a record file :
retenu=non
demande=non
script=#vtbackup /path=/save/backup/demande
position=140+70
and i want to use Perl regex to have the following output
key : "retenu" value : "non"
key : "demande" value "non"
key : "script" value :... (2 Replies)
Hello,
I have been trying to write a script where I could get awk to delete data before and after a matched pattern.
For eg
Raw data
Start
NAME = John
Age = 35
Occupation = Programmer
City = New York
Certification Completed = No
Salary = 80000
End
Start
NAME = Mary
Age = 25... (2 Replies)
Hello everybody,
I would like modify some strings using sed or another command line with the content file.
For example:
- {fqdn: "server-01" , ip: "server-01"}
- {fqdn: "server-02" , ip: "server-02"}
- {fqdn: "server-03" , ip: "server-03"}
- {fqdn: "server-04" , ip: "server-04"}
My... (4 Replies)
Discussion started by: dco
4 Replies
LEARN ABOUT OSX
bindtags
bindtags(n) Tk Built-In Commands bindtags(n)
__________________________________________________________________________________________________________________________________________________NAME
bindtags - Determine which bindings apply to a window, and order of evaluation
SYNOPSIS
bindtags window ?tagList?
_________________________________________________________________DESCRIPTION
When a binding is created with the bind command, it is associated either with a particular window such as .a.b.c, a class name such as But-
ton, the keyword all, or any other string. All of these forms are called binding tags. Each window contains a list of binding tags that
determine how events are processed for the window. When an event occurs in a window, it is applied to each of the window's tags in order:
for each tag, the most specific binding that matches the given tag and event is executed. See the bind command for more information on the
matching process.
By default, each window has four binding tags consisting of the name of the window, the window's class name, the name of the window's near-
est toplevel ancestor, and all, in that order. Toplevel windows have only three tags by default, since the toplevel name is the same as
that of the window. The bindtags command allows the binding tags for a window to be read and modified.
If bindtags is invoked with only one argument, then the current set of binding tags for window is returned as a list. If the tagList argu-
ment is specified to bindtags, then it must be a proper list; the tags for window are changed to the elements of the list. The elements of
tagList may be arbitrary strings; however, any tag starting with a dot is treated as the name of a window; if no window by that name
exists at the time an event is processed, then the tag is ignored for that event. The order of the elements in tagList determines the
order in which binding scripts are executed in response to events. For example, the command
bindtags .b {all . Button .b}
reverses the order in which binding scripts will be evaluated for a button named .b so that all bindings are invoked first, following by
bindings for .b's toplevel ("."), followed by class bindings, followed by bindings for .b. If tagList is an empty list then the binding
tags for window are returned to the default state described above.
The bindtags command may be used to introduce arbitrary additional binding tags for a window, or to remove standard tags. For example, the
command
bindtags .b {.b TrickyButton . all}
replaces the Button tag for .b with TrickyButton. This means that the default widget bindings for buttons, which are associated with the
Button tag, will no longer apply to .b, but any bindings associated with TrickyButton (perhaps some new button behavior) will apply.
EXAMPLE
If you have a set of nested frame widgets and you want events sent to a button widget to also be delivered to all the widgets up to the
current toplevel (in contrast to Tk's default behavior, where events are not delivered to those intermediate windows) to make it easier to
have accelerators that are only active for part of a window, you could use a helper procedure like this to help set things up:
proc setupBindtagsForTreeDelivery {widget} {
set tags [list $widget [winfo class $widget]]
set w $widget
set t [winfo toplevel $w]
while {$w ne $t} {
set w [winfo parent $w]
lappend tags $w
}
lappend tags all
bindtags $widget $tags
}
SEE ALSO
bind(n)
KEYWORDS
binding, event, tag
Tk 4.0 bindtags(n)