Sponsored Content
Top Forums Shell Programming and Scripting Search and Replace text in folders and Subfolders Post 302506613 by Asheesh on Monday 21st of March 2011 11:27:16 AM
Old 03-21-2011
I have to replace &nbsp with &|nbsp and I am using the folloing command

sed -e "s/&nbsp/&|nbsp/g"

But this replace &nbsp with &nbsp|nbsp...what should i do to get the desired results...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to create folders/subfolders using shellscript

Hi, Can any one help me how to create folders using shellscript.My requirement is: FolderName: Main/Main1 :Main/Main2 :Main/Main3 underSubFolder : Main1/A :Main1/B :Main1/C underSubfolder: A/A1 ... (2 Replies)
Discussion started by: ram2s2001
2 Replies

2. Shell Programming and Scripting

Perl: Search for string on line then search and replace text

Hi All, I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text. An example of 4 lines in my file is: 1. MatchText_randomNumberOfText moreData ReplaceMe moreData 2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies

3. Shell Programming and Scripting

Script to Analyze folders and subfolders

I would like to know if there is a script out there that someone may have already written that I can use to analyze folders and sub folders on my AIX system. It can be in perl or a basic korn script. Thanks in advance. (7 Replies)
Discussion started by: seacros
7 Replies

4. UNIX for Advanced & Expert Users

find size of folders and its subfolders with the Owner details

HI, I have the following command that shows me the total size of folders and subfolders : du -hs *| sort -n result: 1.0M sandeep 1.4G sandy 1.4M important 1.6M files but I will need to know the size of folders and its subfolders( not size of individual files though)... (5 Replies)
Discussion started by: bsandeep_80
5 Replies

5. Windows & DOS: Issues & Discussions

Copy folders and subfolders from unix to windows

Sir From a unix machine some folders and their folders have to be copied to windows XP PC. Please help me with a batch file or a shell script. I am new to the the shell and batch files. Thanks in anticipation. sastry (3 Replies)
Discussion started by: chssastry
3 Replies

6. Shell Programming and Scripting

Help to move folders, subfolders and files from unix to windows

Hi Unix Gurus, I am able to copy only files that exist in the parent folder. My parent folder has sub folders and within sub folders there are lots files. I need to copy folder, sub folders and files from Unix to the remote windows SFTP location. The directory structure is something like... (1 Reply)
Discussion started by: shankar1dada
1 Replies

7. Shell Programming and Scripting

search data from text file in different folders

I am fairly new to unix scripting, the problem is i can understand the unix script. but i fail to write. I do not know where to start and how to end. I am sure this forum will help to achive my dream scriptings in unix. Thanks in adv for your help. Here I need.. I have list of columns in one... (2 Replies)
Discussion started by: dsnrhdy
2 Replies

8. Shell Programming and Scripting

Creating matrix from folders and subfolders

Hello, Greetings! please help me produce the following solution. I need to produce one big matrix file from several files in different levels. If it helps, the index folder provides information on chromosome index and the data folder provides information on values for chromosomes. there... (8 Replies)
Discussion started by: newbie83
8 Replies

9. Shell Programming and Scripting

Move specific folders and subfolders in a directory

I am trying to move specific folders and subfolders within a directory using the below. I can see the folders to move and they are at the location, but I am getting an error. Thank you :). mv -v /home/cmccabe/Desktop/NGS/API/6-10-2016{bam/{validation,coverage},bedtools /media/cmccabe/"My... (6 Replies)
Discussion started by: cmccabe
6 Replies

10. UNIX for Beginners Questions & Answers

Command to change add permissions for a new user to all files in all subfolders and folders

Hi there! I'm new to Unix and haven't done command line stuff since MS-Dos and Turbo Pascal (hah!), I would love some help figuring out this basic command (what I assume is basic). I'd like to add a User to the permissions of all files in a folder and all files in all subfolders, as well... (9 Replies)
Discussion started by: Janjbrt
9 Replies
wml::std::toc(3)						     EN Tools							  wml::std::toc(3)

=LT=define-tag toc_section endtag=required> =LT=set-var __i=0 /> =LT=while =LT=lt =LT=get-var __i /> %0 />> =LT=<get-var toc_style
/>*=LT=toc_style_type =LT=get-var __i /> />> =LT=increment __i />=LT=/while> <li*> %body =LT=set-var __i=0 /> =LT=while =LT=lt =LT=get-var __i
/> %0 />> =LT=/<get-var toc_style />> =LT=increment __i />=LT=/while> =LT=/define-tag> "
       "=LT=" "<"
    /> </when>

       #   Define the <HX> and <TOC_HX> container tags (X = 1...6) <set-var __i=1 /> <set-var __pad= /> <while <lt <get-var __i /> 7 />>
	   <subst-in-string " =LT=define-tag h<get-var __i /> endtag=required> =LT=h<get-var __i />* %attributes> =LT=toc_h<get-var __i />>
       %body =LT=/toc_h<get-var __i />> =LT=/h<get-var __i />*> =LT=/define-tag> "
	       "=LT=" "<"
	   />
	   <subst-in-string " =LT=define-tag toc_h<get-var __i/> endtag=required> =LT=preserve alt/> =LT=set-var alt=/> =LT=set-var
       %attributes/> =LT=a name="ToC=LT=get-var __TOCCNT/>">%body</a> {#ToC#: =LT=toc_section <get-var __i/>> <get-var __pad/> =LT=a
       href="#ToC=LT=get-var __TOCCNT/>"><strong> =LT=or =LT=get-var alt/> %body/> </strong></a> =LT=/toc_section> <get-var toc_eol/>
       :#ToC#} =LT=increment __TOCCNT/> =LT=restore alt/> =LT=/define-tag> "
	       "=LT=" "<"
	   />
	   <set-var __pad="<get-var __pad /><get-var toc_pad />" />
	   <increment __i /> </while>

       ##EOF## __END__

NAME
wml::std::toc - Table of Contents Generation SYNOPSIS
#use wml::std::toc [style={pre,nbsp,hspace,ul,ol} [type=...]] <toc> <hN>...</hN> <toc_hN ...>...</toc_hN> DESCRIPTION
This creates a table of contents which can be inserted at any point (even more than once) by the "<toc>" tag. The contents gets created out of all header tags ``"<hN>"'' where ``N'' also controls the indention in the table of contents. Alternatively you can use the "<toc_hN>" tags to insert its body (can be empty!) at the current location and into the Table Of Contents. If specified, the "alt" attribute is included into the ToC instead of the body. STYLES
You may specify any of the five styles "pre", "nbsp", "hspace", "ul" and "ol". The last two accept special options to render HTML lists. With "style=ol", you may choose types 1, "A", "a", "i" and "I" whereas "style=ul" provides "d", "c" and "s" for respectively discs, circles and squares. EXAMPLE
Below is an example to render the Table of Contents with HTML "<pre>" tag. #use wml::std::toc style=pre #use wml::std::page <page> <h1>Chapter 1</h1> <h2>Section 1</h2> <h2>Section 2</h2> <h1>Chapter 2</h1> <h2>Section 1</h2> <h2>Section 2</h2> <toc> Play and choose your favorite! #use wml::std::toc style=ol type=A1ai or #use wml::std::toc style=ul type=dssccc AUTHORS
Ralf S. Engelschall rse@engelschall.com www.engelschall.com Denis Barbier barbier@engelschall.com REQUIRES
Internal: P1, P2, P5, P6 SEE ALSO
HTML "<Hx>" "<UL>" "<OL>" tags. EN Tools 2014-04-16 wml::std::toc(3)
All times are GMT -4. The time now is 05:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy