Sponsored Content
Top Forums Shell Programming and Scripting Search and Replace text in folders and Subfolders Post 302506631 by ctsgnb on Monday 21st of March 2011 12:20:54 PM
Old 03-21-2011
Code:
sed 's/nbsp/|&/g' infile

Code:
# echo "abc&nbsp123"
abc&nbsp123
# echo "abc&nbsp123" | sed 's/nbsp/|&/'
abc&|nbsp123
#

 

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
FS_WHEREIS(1)						       AFS Command Reference						     FS_WHEREIS(1)

NAME
       fs_whereis - Reports each file server housing a file or directory

SYNOPSIS
       fs whereis [-path <dir/file path>+] [-help]

       fs whe [-p <dir/file path>+] [-h]

DESCRIPTION
       The fs whereis command returns the name of each file server machine that houses the volume containing each directory or file named by the
       -path argument.

OPTIONS
       -path <dir/file path>+
	   Names each AFS file or directory for which to return the host file server machine. Partial pathnames are interpreted relative to the
	   current working directory, which is also the default value if this argument is omitted.

       -help
	   Prints the online help for this command. All other valid options are ignored.

OUTPUT
       The output includes a line for each specified directory or file. It names the file server machine on which the volume that houses the
       specified directory or file resides. A list of multiple machines indicates that the directory or file is in a replicated volume.

       Machine names usually have a suffix indicating their cell membership. If the cell is not clear, use the fs whichcell command to display the
       cell in which the directory or file resides. To display the cell membership of the local machine, use the fs wscell command.

EXAMPLES
       The following example indicates that volume housing the directory /afs/abc.com resides is replicated on both "fs1.abc.com" and
       "fs3.abc.com":

	  % fs whereis -path /afs/abc.com
	  File /afs/abc.com is on hosts fs1.abc.com fs3.abc.com

PRIVILEGE REQUIRED
       None

SEE ALSO
       fs_whichcell(1), fs_wscell(1)

COPYRIGHT
       IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

       This documentation is covered by the IBM Public License Version 1.0.  It was converted from HTML to POD by software written by Chas
       Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.

OpenAFS 							    2012-03-26							     FS_WHEREIS(1)
All times are GMT -4. The time now is 10:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy