Sponsored Content
Full Discussion: ls fed into sed help
Top Forums UNIX for Dummies Questions & Answers ls fed into sed help Post 302574112 by varathaneie on Wednesday 16th of November 2011 01:22:10 PM
Old 11-16-2011
try this....

if u want to work with all the files in the current directory, you may to use a looping structure,
Code:
ls > ./list.txt
while read line
do
  sed "/#Text_to_be_deleted/d" $line >tmp
  mv tmp $line
done < ./list.txt
rm ./list.txt

Moderator's Comments:
Mod Comment How to use code tags

Last edited by Franklin52; 11-17-2011 at 05:39 AM.. Reason: Please use code tags, thanks
 

6 More Discussions You Might Find Interesting

1. Cybersecurity

Fed up of Viruses

I am fed up of getting viruses on my computer. They come from other computers on the network and I'm fed up with them. Can anyone reccomend some virus scanning software or something that I can use to prevent my machine from getting viruses? Thanks (3 Replies)
Discussion started by: jacx2
3 Replies

2. UNIX for Dummies Questions & Answers

read user input from within a wile loop that is being fed from below

hi! i need to do a ksh script that uses a wile loop that is fed form below while read line do some things done < myfile inside the while loop i need to read user input to ask the user what he wants to do, but "read" reads the file, and not the standard input while read line do ... (2 Replies)
Discussion started by: broli
2 Replies

3. Red Hat

Help reqd in installing wireless usb on fed 14

Hello all, I am fed up on trying to install my newly purchased usb wireless antenna to my fedora14 machine; so I seek help of all you linux masterminds out there. It worked well in my Win XP. Please help me in setting up it to my Fedora. . Details follows: The device model is : Aztech... (5 Replies)
Discussion started by: gsabarinath
5 Replies

4. UNIX for Dummies Questions & Answers

[ksh93+] Array fed by function is empty when used in main.

I feel that i am missing something obvious but i can't find what is wrong. I have a script that is launching some functions with "&" and each call is feeding the array with a value. When all calls are finished I just want to retrieve the values of that array. It is looking like that : ... (5 Replies)
Discussion started by: bibou25
5 Replies

5. Shell Programming and Scripting

sed and awk giving error ./sample.sh: line 13: sed: command not found

Hi, I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :- ./sample.sh: line... (12 Replies)
Discussion started by: satishmallidi
12 Replies

6. Solaris

Replace critical files with errors - pam_UNIX_auth.so.1 & fed

I moved my server while it was running. I was in a hurry. Also it's a bare motherboard with drives in a cage sitting basically on their own. Once I realized how badly I had hurt it doing this, I mounted the board in a tower case I repurposed, mounted the drives, power supply etc. Now the... (1 Reply)
Discussion started by: BillyPrefect
1 Replies
html2pdbtxt(1)						      General Commands Manual						    html2pdbtxt(1)

NAME
html2pdbtxt - HTML to Doc Text converter for Palm Pilots SYNOPSIS
html2pdbtxt [ -bchars ] [ -ttitle ] [ -uURL ] file.html [ file.txt ] html2pdbtxt -v DESCRIPTION
html2pdbtxt converts HTML to text suitable for conversion to a Doc(4) file via txt2pdbdoc(1). If no text filename is given, the generated text is sent to standard output. HTML Tags The following HTML tags (and corresponding ending tags) are recognized: ADDRESS, A NAME, BLOCKQUOTE, BR, CENTER, DIV, DL, DT, H1, H2, H3, H4, H5, H6, OL, OPTION, PRE, P, SELECT, SCRIPT, STYLE, TABLE, TITLE, UL. In all cases, the most ``reasonable'' thing is done given the constraints of the Doc(4) format which is essentially plain text. ALT attributes (typically found in IMG tags) have their text extracted and placed between brackets [like this]. All other HTML tags are stripped. Character Entities Both HTML character and numeric (decimal and hexadecimal) entity references are converted to their byte value according to the ISO 8859-1 (Latin 1) character set so they appear properly on the Pilot. For example, ``r&eacute;sum&#233;'' becomes ``resume'' with accented letter 'e's. Document Title Unless specified with the -t option, the HTML file is scanned for <TITLE> ... </TITLE> tags and, if found, the title is extracted and put on line 1 of the generated file. Bookmarks Bookmarks are placed into the generated file wherever <A NAME="..."> tags are found in the HTML file. OPTIONS
-bchars Specify the character sequence that is to serve as the bookmark indicator. The default is (*). (See the CAVEATS.) -ttitle Specify the title of the document that is to appear on line 1 of the generated file overriding any title found inside the HTML file between <TITLE> ... </TITLE> tags. -uurl Specify the URL the HTML file supposedly came from and put it on the line after the title, if any, in the generated file. -v Print the version number to standard output and exit. EXAMPLE
To convert an HTML file to Doc: html2pdbtxt -u http://www.wonderland.org/ alice.html alice.txt txt2pdbdoc "`head -1 alice.txt`" alice.txt alice.pdb CAVEATS
1. Some Doc readers have a ``feature'' whereby, during the scan for bookmarks phase, they recognize the bookmark sequence of characters anywhere in the text and not just at the beginning of a line. 2. Some Doc readers do not allow the bookmark sequence to contain the > character since they interpret that as the sequence delimiter, e.g., <->> will be interpreted as the sequence being merely -. 3. Ordered lists (via the OL tag) are treated as unordered lists (like the UL tag) because it would greatly complicate the code since it would have to be parsed rather than simple substitutions being performed. SEE ALSO
pdbtxt2html(1), txt2pdbdoc(1), doc(4), pdb(4) International Standards Organization. ``ISO 8859-1: Information Processing -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1.'' 1987. World Wide Web Consortium. ``Character entity references in HTML 4.0.'' HTML 4.0 Specification, http://www.w3.org/ AUTHOR
Paul J. Lucas <pauljlucas@mac.com> html2pdbtxt January 21, 2005 html2pdbtxt(1)
All times are GMT -4. The time now is 02:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy