Sponsored Content
Top Forums Shell Programming and Scripting need to remove a range of files Post 302303833 by gsiva on Friday 3rd of April 2009 03:00:11 PM
Old 04-03-2009
i need to remove the line in a file, such as

<script language=javascript><!-- . . . .. . . . . .. .. . . .. .
</scripts>


I need to remove the link with the header starts with <script language ....</scripts> Also, this line has to be removed for the files with the extension of *.html ... Could you please help me on this...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cp only files in certain date range

hi all, I'm trying to do a cp only on files I created on a given day or within a certain date range. What's the best way to do this? Cheers, KL (1 Reply)
Discussion started by: ee7klt
1 Replies

2. Shell Programming and Scripting

remove range part of a file with sed

Hello, I would like to remove a range from a file with sed or any script command that is appropriate The section start by and finish by and I would like to keep line Could you tell me which command I should type ? Thanks a lot, Franck My input file is like this... (1 Reply)
Discussion started by: mfranck
1 Replies

3. Shell Programming and Scripting

Remove strings within range using sed

Hey folks I have a big file that contains junk data between the tags <point> and </point> and I need to delete it (including `<point>' and `</point>'). i.e. a = 1 <point> 123123 2342352 234231 234256 </point> print a needs to become a = 1 print a I'm certain that this is a... (10 Replies)
Discussion started by: ksk
10 Replies

4. Shell Programming and Scripting

remove unwanted specific line range

Hello everyone...I have large txt file and I would like to remove unwanted specific line. My data is like this: So I would like to remove from line below No. until line reassambled like this: Thanks... (4 Replies)
Discussion started by: taxi
4 Replies

5. Shell Programming and Scripting

Remove a range of lines from a file using sed

Hi I am having some issue editing a file in sed. What I want to do is, in a loop pass a variable to a sed command. Sed should then search a file for a line that matches that variable, then remove all lines below until it reaches a line starting with a constant. I have managed to write a... (14 Replies)
Discussion started by: Andy82
14 Replies

6. Shell Programming and Scripting

Remove duplicate entries based on the range

I have file like this: chr start end chr15 99874874 99875874 chr15 99875173 99876173 aa1 chr15 99874923 99875923 chr15 99875173 99876173 aa1 chr15 99874962 99875962 chr15 99875173 99876173 aa1 chr1 ... (7 Replies)
Discussion started by: raj_k
7 Replies

7. UNIX for Advanced & Expert Users

Vi remove line range containing a string

In vi I would like to remove a line containing a string. I thought after reading this I could do this. https://www.unix.com/302297288-post3.html :'3560,3572/gcc/d' It keeps complaining vi mark not set. And sometimes it complains E488: Trailing characters. I don't understand what mark... (5 Replies)
Discussion started by: cokedude
5 Replies

8. Shell Programming and Scripting

awk to remove range of fields

I am trying to cut a range of fields in awk. The below seems to work for removing field 50, but what is the correct syntax for removing a range ($50-$62). Thank you :). awk awk 'BEGIN{FS=OFS="\t"}{$50=""; gsub(/\t\t/,"\t")}1' test.vcf.hg19_multianno.txt > output.csv Maybe: awk... (6 Replies)
Discussion started by: cmccabe
6 Replies

9. Shell Programming and Scripting

Check/print missing number in a consecutive range and remove duplicate numbers

Hi, In an ideal scenario, I will have a listing of db transaction log that gets copied to a DR site and if I have them all, they will be numbered consecutively like below. 1_79811_01234567.arc 1_79812_01234567.arc 1_79813_01234567.arc 1_79814_01234567.arc 1_79815_01234567.arc... (3 Replies)
Discussion started by: newbie_01
3 Replies

10. Shell Programming and Scripting

sed or awk to remove specific column to one range

I need to remove specific column to one range source file 3 1 000123456 2 2 000123569 3 3 000123564 12 000123156 15 000125648 128 000125648 Output required 3 000123456 2 000123569 3 000123564 12 000123156 15 000125648 128 000125648 (6 Replies)
Discussion started by: ranjancom2000
6 Replies
rmvq(9F)						   Kernel Functions for Drivers 						  rmvq(9F)

NAME
rmvq - remove a message from a queue SYNOPSIS
#include <sys/stream.h> void rmvq(queue_t *q, mblk_t *mp); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
q Queue containing the message to be removed. mp Message to remove. DESCRIPTION
rmvq() removes a message from a queue. A message can be removed from anywhere on a queue. To prevent modules and drivers from having to deal with the internals of message linkage on a queue, either rmvq() or getq(9F) should be used to remove a message from a queue. CONTEXT
rmvq() can be called from user or interrupt context. EXAMPLES
This code fragment illustrates how one may flush one type of message from a queue. In this case, only M_PROTO T_DATA_IND messages are flushed. For each message on the queue, if it is an M_PROTO message (line 8) of type T_DATA_IND (line 10), save a pointer to the next mes- sage (line 11), remove the T_DATA_IND message (line 12) and free it (line 13). Continue with the next message in the list (line 19). 1 mblk_t *mp, *nmp; 2 queue_t *q; 3 union T_primitives *tp; 4 5 /* Insert code here to protect queue and message block */ 6 mp = q->q_first; 7 while (mp) { 8 if (mp->b_datap->db_type == M_PROTO) { 9 tp = (union T_primitives *)mp->b_rptr; 10 if (tp->type == T_DATA_IND) { 11 nmp = mp->b_next; 12 rmvq(q, mp); 13 freemsg(mp); 14 mp = nmp; 15 } else { 16 mp = mp->b_next; 17 } 18 } else { 19 mp = mp->b_next; 20 } 21 } 22 /* End of region that must be protected */ When using rmvq(), you must ensure that the queue and the message block is not modified by another thread at the same time. You can achieve this either by using STREAMS functions or by implementing your own locking. SEE ALSO
freemsg(9F), getq(9F), insq(9F) Writing Device Drivers STREAMS Programming Guide WARNINGS
Make sure that the message mp is linked onto q to avoid a possible system panic. SunOS 5.10 9 Jul 2001 rmvq(9F)
All times are GMT -4. The time now is 11:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy