Sponsored Content
Top Forums Shell Programming and Scripting Search and Replace text in folders and Subfolders Post 302506616 by sk1418 on Monday 21st of March 2011 11:34:01 AM
Old 03-21-2011
bash code:
  1. kent$ echo "abc&nbsp123" | sed -r 's#\&nbsp#\&\|nbsp#g'
  2. abc&|nbsp123
This User Gave Thanks to sk1418 For This Post:
 

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
FLIST(1)                                                             [nmh-1.5]                                                            FLIST(1)

NAME
flist, flists - list the number of messages in given sequence(s) SYNOPSIS
flist [+folder1 [+folder2 ...]] [-sequence name1 [-sequence name2 ...]] [-all | -noall] [-showzero | -noshowzero] [-recurse | -norecurse] [-fast | -nofast] [-alpha | -noalpha] [-version] [-help] flists is equivalent to flist -all DESCRIPTION
Flist is used to search a list of folders and display the number of messages in these folders that are in a given sequence or set of sequences (for example the "unseen" sequence). This is especially useful if you use some mechanism such as slocal or procmail (typically in conjunction with rcvstore) to pre-sort your mail into different folders before you view it. By default, the command flist will search the current folder for the given sequence or sequences (usually "unseen"). If (possibly multi- ple) folders are specified on the command line with +folder, then all these folders are searched for the given sequence(s). Flist will display for each folder searched, the number of messages in each of the specified sequences, and the total number of messages. The option -sequence is used to specify the name of a sequence in which to search for. This option may be used multiple times to specify multiple sequences. If this is not given, then the default is to search for all the sequences specified by the "Unseen-Sequence" profile component. For more details about sequences, read the mh-sequence(5) man page. Typically, flist will produce a line for each sequence, for every folder that is searched, even those which do not contain any messages in the given sequence. Specifying -noshowzero will cause flist to print only those folder/sequence combinations such the folder has a non- zero number of messages in the given specified sequence. If -recurse is given, then for each folder that is search, flist will also recursively descend into those folders to search subfolders for the given sequence. If -fast is given, only the names of the folders searched will be displayed, and flist will suppress all other output. If this option is used in conjunction with -noshowzero, then flist will only print the names of those folders searched that contain messages in in at least one of the specified sequences. Multiple Folders If the option -all is given (and no folders are specified with +folder), then flist will search all the folders in the top level of the users nmh directory. These folders are all preceded by the read-only folders, which occur as "atr-cur-" entries in the user's nmh context. An example of the output of flist -all is: /work/Mail has 5 in sequence unseen (private); out of 46 inbox+ has 10 in sequence unseen ; out of 153 junklist has 0 in sequence unseen ; out of 63 postmaster has 1 in sequence unseen ; out of 3 The "+" after inbox indicates that it is the current folder. The "private" flag indicates that the given sequence for that folder is private. See the mh-sequence(5) man page for details about private sequences. If the option -all and +folder are both specified, then flist will search this folder, and all its first level subfolders for the given sequence. You may specify multiple folders in this way. If flist is invoked by a name ending with "s" (e.g. flists), then the switch -all is assumed by default. The sorting order for the listing is alphabetical (with -alpha), or in a priority order defined by the "Flist-Order" profile entry (with -noalpha). Each item in the "Flist-Order" is a folder name or a folder name pattern that uses * to match zero or more characters. Longer matching patterns have precedence over shorter matching patterns. For example: Flist-Order: personal petproject mh* * admin *junk This order puts a few interesting folders first, such as those with mail addressed to you personally, those about a pet project, and those about mh-related things. It places uninteresting folders at the end, and it puts everything else in the middle in alphabetical order. FILES
$HOME/.mh_profile The user profile PROFILE COMPONENTS
Path: To determine the user's nmh directory mh-sequences: File that contains public sequences Unseen-Sequence: The name of the unseen message sequence Flist-Order: To sort folders by priority SEE ALSO
folder(1), rcvstore(1), slocal(1), mh-sequence(5) DEFAULTS
`-sequence' defaults to Unseen-Sequence profile entry `-showzero' `-noall' `-norecurse' `-noalpha' `-nofast' CONTEXT
If +folder is given, it will become the current folder. If multiple folders are given, the last one specified will become the current folder. MH.6.8 11 June 2012 FLIST(1)
All times are GMT -4. The time now is 02:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy