Sponsored Content
Top Forums Shell Programming and Scripting awk find and replace in multiple files Post 302336533 by austindr7 on Wednesday 22nd of July 2009 10:03:43 AM
Old 07-22-2009
Searching files

Has anyone heard of SELCOPY? It is a general purpose programming tool commercially available. Things like file search and change is really easy for it and simpler than standard Unix tools.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find and replace files in multiple folders

Hi there, I would like to write a script to automate the copy and renaming of files in multiple dir. I have a generic file named s253e.prb and would like to copy this to multiple dir and rename it. Example: Dir is AL-M1 and the prb file name is AL-M1.prb. I would like to be able to... (6 Replies)
Discussion started by: lodey
6 Replies

2. Shell Programming and Scripting

Find and Replace in multiple files (Shell script)

hi guys, Suppose you have 100 files in a folder and you want to replace all occurances of a word say "ABCD" in those files with "DCBA", how would you do it ??? jatin (13 Replies)
Discussion started by: jatins_s
13 Replies

3. UNIX for Dummies Questions & Answers

Find and replace a string in multiple files

I used the following script cd pathname for y in `ls *`; do sed "s/ABCD/DCBA/g" $y > temp; mv temp $y; done and it worked fine for finding and replacing strings with names etc. in all files of the given path. I'm trying to replace a string which consists of path (location of file) ... (2 Replies)
Discussion started by: pharos467
2 Replies

4. UNIX for Dummies Questions & Answers

how to find and replace strings in multiple files

Hi All, Iam new to unix, I need to find string and replace it in the file name. Like text_123_0.txt,text_123_1.txt,text_123_2.txt. I need to search 123 and replace it with 234 . Is there any unix command to replace them in single command since i have 5 directories. So i need to go each and every... (0 Replies)
Discussion started by: etldeveloper
0 Replies

5. Emergency UNIX and Linux Support

Find, replace, file path in multiple files for Solaris 10

Guys I have a big issue that I need to get fixed ASAP however I can not seem to find a way to do it. We started to use zones with Solaris 10 at work and we moved a zone from a SIT box to a DEV box. Problem is the software we have installed is looking at a /lcl/sit/apps/ path and it needs to look... (5 Replies)
Discussion started by: LRoberts
5 Replies

6. UNIX for Advanced & Expert Users

linux find and replace in multiple files

Is there a reason why all of these examples of linux find and replace in multiple files use find and grep to pipe into sed or perl. Why not just use sed or perl directly with something like this? sed -i 's/echo/burnbaby/g' booboo*... (2 Replies)
Discussion started by: cokedude
2 Replies

7. Shell Programming and Scripting

Find and Replace in multiple fields using awk

Hi, Say I have a record "1|22| | |". In which the third and fourth fields are <space> alone. I have to replace the <Space> with <null>. Input: "1|22| | |" --> "1|22|<space> |<space> |" Expected output: "1|22|||" --> "1|22|<null> |<null>|" I tried: echo "1|22| | |" | awk -F... (4 Replies)
Discussion started by: machomaddy
4 Replies

8. Shell Programming and Scripting

Script to find & replace a multiple lines string across multiple php files and subdirectories

Hey guys. I know pratically 0 about Linux, so could anyone please give me instructions on how to accomplish this ? The distro is RedHat 4.1.2 and i need to find and replace a multiple lines string in several php files across subdirectories. So lets say im at root/dir1/dir2/ , when i execute... (12 Replies)
Discussion started by: spfc_dmt
12 Replies

9. Shell Programming and Scripting

Find and replace in multiple files

Hi, I have php files in main dir and sub dir's as well. I need to find "new mysqli('localhost', 'System', 'xxxxxx', 'System', '3306');" and replace as "new mysqli('localhost', 'unx_sys', 'yyyy', 'unx_sys', '3306');" I tried like: sed 's/new mysqli\(*\)\;$/new... (1 Reply)
Discussion started by: ashokvpp
1 Replies

10. UNIX for Beginners Questions & Answers

Find and replace from multiple files

Hello everybody, I need your help. I have a php site that was expoited, the hacker has injected into many php files a phishing code that was discovered and removed in order to have again a clean code. Now we need to remove from many php files that malware. I need to create a script that find and... (2 Replies)
Discussion started by: ninocap
2 Replies
atom_description_file(5)					File Formats Manual					  atom_description_file(5)

NAME
atom_description_file - Description of an Atom tool's instrumentation and analysis files. DESCRIPTION
An Atom tool's description file identifies and describes the tool's instrumentation and analysis files. It can also specify the flags to be used by the cc, ld, and atom commands when it is compiled, linked, and invoked. Each Atom tool must supply at least one description file. See atom(1) for additional information on Atom. You must place a tool's description files, along with its instrumentation and analysis files, in the tool's directory. By default, Atom searches for tools in the /usr/lib/cmplrs/atom/tools and /usr/lib/cmplrs/atom/examples directories. You can add directories to the search path by supplying a colon-separated list of additional directories to the ATOMTOOLPATH environment variable. Atom has two types of description files: A description file providing an environment for generalized use of the tool. A tool can provide only one general-purpose environment. The name of this type of description file has the format: tool.desc. A description file providing an environment for use of the tool in specific contexts, such as in a multithreaded application or in kernel mode. A tool can provide sev- eral special-purpose environments, each of which has its own description file. The name of this type of description file has the format: tool.environment.desc. The names supplied for the tool and environment portions of these names correspond to values the user specifies with the -tool and -env flags on an atom command when invoking the tool. An Atom description file is a text file containing a series of tag, value pairs. The tag and value are separated by white space and occupy a single line. The order of the lines in a description file are unimportant. Lines starting with a pound sign (#) are comments, blank lines are ignored. A line can be continued by ending with a backslash () newline character. The following tag values are defined. If a tool's description file contains an unknown tag, Atom issues a warning and ignores that tag's line. Duplicate tags in a description file cause a fatal error. -------------------------------------------------------------------- Tag Meaning -------------------------------------------------------------------- INST_FILE The tool's instrumentation file. This tag is required in all description files. The file can be either a C source file (with a suffix) or an object module (with an suffix). No other file types are allowed. ANAL_FILE The tool's analysis file. If this is not specified, a null analysis file is used. The file can be either a C source file (with a ".c" suffix) or an object module (with a ".o" suffix). No other file types are allowed. INST_CFLAGS Flags to be passed to the C compiler when compiling the instrumentation file. This tag is ignored if the instrumentation file is not a C source file. ANAL_CFLAGS Flags to be passed to the C compiler when compiling the analysis file. This tag is ignored if the analy- sis file is not specified, or is not a C source file. INST_LDFLAGS Flags to be passed to the linker when linking the instrumentation file with the Atom run-time system. ANAL_LDFLAGS Flags to be passed to the linker when linking the analysis file to resolve all undefined symbols. ATOM_REQ Required atom command line flags for the tool described by this description file. These flags are implicitly passed to Atom when the tool is invoked. If the user specifies a conflicting flag, the atom command displays a warning and ignores the user- specified switch. ATOM_DEF Default atom command line flags for the tool described by this description file. These flags are implicitly passed to Atom when the tool is invoked. If the user specifies a conflicting flag, the atom command overrides the corresponding flag listed in this list. -------------------------------------------------------------------- The following description file is for a tool named pixie that has an instrumentation file called pixie.inst.c and an analysis file called pixie.anal.c. The instrumentation file links in the libmld library (using the -lmld flag) and the analysis file links in the pdf library (using the -lpdf flag). # # pixie.desc # INST_FILE pixie.inst.c ANAL_FILE pixie.anal.c INST_LDFLAGS -lmld ANAL_LDFLAGS -lpdf The following environment-specific description file supports a version of the pixie tool for the threads environment. The threaded version of pixie uses the same instrumentation and analysis source files as the general-purpose version. However, the source files are compiled with the -DTHREADS compiler flag. # # pixie.threads.desc # INST_FILE pixie.inst.c ANAL_FILE pixie.anal.c INST_CFLAGS -DTHREADS ANAL_CFLAGS -DTHREADS INST_LDFLAGS -lmld ANAL_LDFLAGS -lpdf The following general-purpose description file for the third Atom tool specifies default and required atom command line flags. It forces the -heapbase progend flag to be passed to atom whenever the third tool is invoked. It also passes the -A1 flag to the atom command line unless the user overrides this option by explicitly specifying -A0 when issuing the command. # # third.desc # INST_FILE third.inst.o ANAL_FILE third.anal.o ATOM_REQ -heapbase progend ATOM_DEF -A1 ----------------------------------------------------------------- SEE ALSO
Commands: atom(1) AtomTools: hiprof(5), pixie(5), third(5) Functions: atom_application_instrumentation(5), atom_application_navigation(5), atom_application_query(5), atom_application_resolvers(5), atom_object_management(5), atom_instrumentation_routines(5), AnalHeapBase(5), Xlate(5), Thread(5) Programmer's Guide atom_description_file(5)
All times are GMT -4. The time now is 10:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy