Sponsored Content
Top Forums UNIX for Dummies Questions & Answers vi search & replace ... having '/' in string - problem. Post 302122431 by kamitsin on Wednesday 20th of June 2007 12:40:30 PM
Old 06-20-2007
Code:
s/abc//abc\/data/g

kamitsin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

String Search & Replace

Hey, I want to have a C program which, for an existing file supplied by the command line argument (E.g. File1.txt) replaces all the occurrences of the words: "We” or “we” by “I” “a” by “the” “A” by “The”. Then print the replaced file. All other characters of the file are to be left... (1 Reply)
Discussion started by: IwishIknewC
1 Replies

2. Shell Programming and Scripting

how to insert line break + string in vi (search & replace )

Hello all i have big test file that has allot of structure text something like this : <foo1 *.html> <blah action> somthing 1 somthing 2 </blah> </foo1 > now i will like to insert 2 more lines of text below the <blah action> so it will be like : <foo1... (1 Reply)
Discussion started by: umen
1 Replies

3. 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

4. UNIX for Dummies Questions & Answers

Search & Replace

Hi , I ahve a text file which has several instances of the text such as run_time: 09:30 I need to add double quotes before and after the time value i.e: run_time: "09:30" Any suggestions on how to go about the same (4 Replies)
Discussion started by: jobbyjoseph
4 Replies

5. Shell Programming and Scripting

How do I search first&second string & copy all content between them to other file?

Hi All, How do I search first string & second string and copy all content between them from one file to another file? Please help me.. Thanks In Advance. Regards, Pankaj (12 Replies)
Discussion started by: pankajp
12 Replies

6. Shell Programming and Scripting

Search, replace string in file1 with string from (lookup table) file2?

Hello: I have another question. Please consider the following two sample, tab-delimited files: File_1: Abf1 YKL112w Abf1 YAL054c Abf1 YGL234w Ace2 YKL150w Ace2 YNL328c Cup9 YDR441c Cup9 YDR442w Cup9 YEL040w ... File 2: ... ABF1 YKL112W ACE2 YLR131C (9 Replies)
Discussion started by: gstuart
9 Replies

7. Shell Programming and Scripting

awk - replace number of string length from search and replace for a serialized array

Hello, I really would appreciate some help with a bash script for some string manipulation on an SQL dump: I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump. This is quite easy with sed: sed -e... (1 Reply)
Discussion started by: otrotipo
1 Replies

8. Shell Programming and Scripting

Find & Replace string in multiple files & folders using perl

find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g' this is simple logic to find and replace in multiple files & folders Hope this helps. Thanks Zaheer (0 Replies)
Discussion started by: Zaheer.mic
0 Replies

9. Shell Programming and Scripting

awk + gsub to search multiple input values & replace with located string + extra text

Hi all. I have the following command that is successfully searching for any one of the strings on all lines of a file and replacing it with the instructed value. cat inputFile | awk '{gsub(/aaa|bbb|ccc|ddd/,"1234")}1' > outputFile This does in fact replace any occurrence of aaa, bbb,... (2 Replies)
Discussion started by: dazhoop
2 Replies

10. Shell Programming and Scripting

Search & Replace

Hi Gurus, I have two files. I want to read sessoin_name from the file1 and replace $Param4 & $Param5 in file2 with connection_name in specified in file1. The file1 will have data in following format File 1 session_name,connection_name s_abcd,Listener_2 s_def,Listener_1 source file... (7 Replies)
Discussion started by: r_t_1601
7 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:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy