I was google searching and found
Perl as a command line utility tool
This almost solves my problem:
find . | xargs perl -p -i.old -e 's/oldstring/newstring/g'
I think this would create a new file for every file in my directory tree. Most of my files will not contain oldstring and I... (1 Reply)
I have a rather complicated search and replace I need to do among several dozen files and over a hundred occurrences. My site is written in PHP and throughout the old code, you will find things like
die("Operation Aborted due to.....");
For my new design skins for the site, I need to get... (2 Replies)
Hi,
I have a folder which contains multiple config.xml files and one input file, Please see the below format.
Config Files format looks like :-
Code:
<application name="SAMPLE-ARCHIVE">
<NVPairs name="Global Variables">
<NameValuePair>
... (0 Replies)
Hi all
I'm in need of a command which can replace a specified string with another string - across multiple files within multiple sub-directories (I intend to run it from / )
I've used the following to get a list of the files:
find . | xargs grep <string1>
But that's as far as I've got.... (7 Replies)
Hello.
I have five config files in /etc that I want to edit in one click for testing.
I would like to make a script like this :
#!/bin/bash
#
a_file="/etc/file_1"
src_str="src_string_1"
rpl_str="rpl_string_1"
calling_sed_or_awk_or_whatelse $a_file search_for_all $src_str replace_with... (4 Replies)
I need to update about 2400 files in a directory subtree, with a new directory path inside the files
I need to change this occurence in all files: /d2/R12AB/VIS/apps/tech_st/10.1.2
with this: /u01/PROD/apps/apps_st/10.1.3
I know how to change single words using "find . -type f -print0 |... (6 Replies)
When I use special characters the command to replace multiple files with a string pattern does nt work.
---------- Post updated at 12:33 PM ---------- Previous update was at 11:38 AM ----------
This works
perl -pi -e 's/100/test/g' *
This does nt work
perl -pi -e 's... (1 Reply)
I have a list of files all over a file system e.g.
/home/1/foo/bar.x
/www/sites/moose/foo.txtI'm looking for strings in these files and want to replace each occurrence with a replacement string, e.g.
if I find: '#@!^\&@ in any of the files I want to replace it with: 655#@11, etc.
There... (2 Replies)
Hello,
I have hundreds of files in which I need to change email address. Here is what I am trying to do:
1. All text files are in a directory "a"
2. In the text file, I want to replace email address for preparer. All these lines start with {{PreparerEmail and end with }}. The email... (3 Replies)
Hi there,
I am using AIX and trying to search and replace a string with another string in multiple files in different directories.
I wanted to search replace in steps so I don't change all of the instance anywhere in the server at once, minimizing impact.
STEP 1:
--------
I first searched... (5 Replies)
Discussion started by: zaino22
5 Replies
LEARN ABOUT OPENDARWIN
nifind
NIFIND(1) General Commands Manual NIFIND(1)NAME
nifind - find a directory in the NetInfo hierarchy
SYNOPSIS
nifind [ -anvp ] [ -t timeout ] directory [ domain ]
DESCRIPTION
nifind searches for the named directory in the NetInfo hierarchy. It starts at the local domain and climbs up through the hierarchy until
it reaches the root domain. Any occurrences of directory are reported by directory ID number. If the optional domain argument is given,
then nifind stops climbing at that point in the hierarchy. The domain argument must be specified by an absolute or relative domain name.
When invoked with the -a option, nifind searches for the named directory in the entire NetInfo hierarchy (or the subtree with domain as the
root if domain is specified). The -n option exempts local domains from the search.
nifind uses a default two second connection timeout when contacting a domain. The connection timeout can be overridden with the -t option.
OPTIONS -a Search for directory in the entire NetInfo hierarchy.
-n Exempt local directories from the search.
-p Print directory contents.
-t timeout
Specify an integer value as the connection timeout (in seconds).
-v Produce verbose output.
EXAMPLES
% nifind /printers/inky
/printers/inky found in /software, id = 202
/printers/inky found in /, id = 357
% nifind -a /machines/mailhost /sales
/machines/mailhost found in /sales, id = 234
% nifind -v /users/uid=164
/users/uid=164 not found in /sales/polaris
/users/uid=164 not found in /sales
/users/uid=164 found in /, id = 451
% nifind -p /machines/mailhost
/machines/mailhost found in /sales, id=171
name: zippy mailhost
ip_address: 192.42.172.5
/machines/mailhost found in /, id = 350
name: zorba mailhost
ip_address: 192.42.172.1
SEE ALSO netinfo(5)AUTHOR
Marc Majka, Apple Computer Inc.
BUGS
nifind does not complain if domain is not an ancestor specified in a normal search.
Apple Computer, Inc. August 9, 1994 NIFIND(1)