Sponsored Content
Top Forums Shell Programming and Scripting Recursivley search files and replace the characters Post 302926409 by manas_ranjan on Monday 24th of November 2014 07:22:40 AM
Old 11-24-2014
how to work this out if situation remains same only difference is now cnf file is a XML one instead flat file name=value

Code:
1st_FILE.cnf
<FILE_NAME> [TST_FILE]</FILE_NAME>
<FILE_VALUE> [FILE_NAME]</FILE_VALUE>

o/p should be
Code:
1st_FILE.cnf.new
<FILE_NAME>1st_FILE.txt</FILE_NAME>
<FILE_VALUE>1st_FILE.txt</FILE_VALUE>

Only tag name are going to same across different cnf files only variable names are different.
<FILE_NAME> and <FILE_VALUE>

Last edited by manas_ranjan; 11-24-2014 at 09:58 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Best way to search files for non-printable characters?

I need to check ftp'd incoming files for characters that are not alphanumeric,<tab>, <cr>, or <lf> characters. Each file would have 10-20,000 line with up to 3,000 characters per line. Should I use awk, sed, or grep and what would the command look like to do such a search? Thanks much to anyone... (2 Replies)
Discussion started by: jvander
2 Replies

2. Shell Programming and Scripting

Search For Control M characters in files

Hi , I have special character control M in many of my files as below ersNet-Telnet-3.03/Makefile.PL100644 21166 144 612 7113770214 135 77 0ustar jayusers## -*- Perl -*-^M ^M use ExtUtils::MakeMaker qw(WriteMakefile);^M ^M WriteMakefile(NAME => "Net::Telnet",^M ... (4 Replies)
Discussion started by: Mohammed
4 Replies

3. Shell Programming and Scripting

Replace Characters for bunch of Files.

Hi, I am new to unix and looking out for some help in reading a file contents and replacing the characters, the requirement is I having a folder and having nearly 300 txt files, all the file contents contains some words we need to iterate all each and every files and need to find and replace it... (1 Reply)
Discussion started by: subrahmaniank
1 Replies

4. Shell Programming and Scripting

search and replace characters in one string

I have lines like: Dog Cat House Mouse Dog Cat House Mouse Dog Cat House Mouse Dog Cat House Mouse I'd like to replace characters only in $3. H -> Z s -> W e -> x Resulting in something like (where $1, $2, and $4 are not changed): Dog Cat ZouWx Mouse Dog Cat ZouWx Mouse... (3 Replies)
Discussion started by: dcfargo
3 Replies

5. Shell Programming and Scripting

Search and Replace between two files

Hi all- I've got 2 files: One is the final results and one is a result set from a query. In the final results files I have placeholder strings in there that need to be replaced by the corresponding strings from the query file. So File#1 (FINAL RESULTS) LINEID CLIENT ID REP ... (1 Reply)
Discussion started by: Cailet
1 Replies

6. Shell Programming and Scripting

Replace special characters in multiple files - perl

I have 100 files, where i want to search a set of strings and make the replacement by other strings In the first case I want to include a parameter in the name of a file LOG_DCT = $ LOG_DIR/DCT_GERAL_"$DATAINI".log replace to : LOG_DCT = $ LOG_DIR / DCT_GERAL_ $ 1_ "$ DATAINI". log I did... (1 Reply)
Discussion started by: RMSoares
1 Replies

7. Shell Programming and Scripting

Search and replace particular characters in fixed length-file

Masters, I have fixed length input file like FHEAD0000000001XXXX20090901 0000009000Y1000XXX2 THEAD000000000220090901 ITM0000109393813 430143504352N22SP 000000000000RN000000010000EA P0000000000000014390020090901 TTAIL0000000003000000 FTAIL00000000040000000002 Note... (4 Replies)
Discussion started by: bittoo
4 Replies

8. Shell Programming and Scripting

search pattern and replace x-y characters in nth line after every match

Hi, I am looking for any script which can do the following. have to read a pattern from fileA and copy it to fileB. fileA: ... ... Header ... ... ..p1 ... ... fileB: .... .... Header (3 Replies)
Discussion started by: anilvk
3 Replies

9. Shell Programming and Scripting

Search and Replace Extended Ascii Characters

We are getting extended Ascii characters in the input file and my requirement is to search and replace them with a space. I am using the following command LANG=C sed -e 's// /g' It is doing a good job, but in some cases it is replacing the extended characters with two spaces. So my input... (12 Replies)
Discussion started by: ysvsr1
12 Replies

10. UNIX for Dummies Questions & Answers

Search special characters in a file and replace with meaningful text messages like Hello

Search special characters in a file and replace with meaningful text messages like Hello (2 Replies)
Discussion started by: raka_rjit
2 Replies
texlinks(8)							       teTeX							       texlinks(8)

NAME
texlinks - maintain symbolic links from format to engine SYNOPSIS
texlinks [ OPTIONS... ] DIRECTORIES... DESCRIPTION
texlinks is used to create or recreate symbolic links from formats to engines according to the information in fmtutil.cnf or a file speci- fied with --cnffile. DIRECTORIES is an optional list of directories in which to operate. If no directories are specified the list of directories depends on the --multiplatform option. OPTIONS
--cnffile FILE or -f FILE use file as configuration file (default: fmtutil.cnf) --help or -h show some help text --multiplatform or -m operate in all platform-specific directories (default: operate only in the directory for this platform) --silent or -s silently skip over existing scripts/binaries instead of printing a warning --unlink or -u Unlink previously created symlinks --verbose or -v +set verbose mode on (default: off) FILES
fmtutil.cnf default configuration file SEE ALSO
fmtutil(1), fmtutil.cnf(5) Web page: <http://tug.org/teTeX/> BUGS
None known, but report any bugs found to <tex-k@tug.org> (mailing list). AUTHOR
texlinks was written by Thomas Esser <te@dbs.uni-hannover.de> in 1999. texlinks has been released into the public domain. This manual page was written by C.M. Connelly <c@eskimo.com>, for the Debian GNU/Linux system. It may be used by other distributions with- out contacting the author. Any mistakes or omissions in the manual page are my fault; inquiries about or corrections to this manual page should be directed to me (and not to the primary author). teTeX November 2007 texlinks(8)
All times are GMT -4. The time now is 02:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy