Sponsored Content
Top Forums Shell Programming and Scripting Read from one file-Replace a pattern in another with the current one Post 302740139 by rdrtx1 on Wednesday 5th of December 2012 03:38:58 PM
Old 12-05-2012
also try:
Code:
c=1 ; while read w ; do sed 's/website/'"$w"'/g' main.txt > main$c.txt ; (( c = c + 1 )) ; done < replace.txt

This User Gave Thanks to rdrtx1 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

read file and print additional rows till current year

Hi all i have a file like 2006,1,2 2007,2,3 2008,3,4 I will read this and my output should be like 2006,1,2 2007,1,2 2008,1,2 2007,2,3 2008,2,3 2008,3,4 Giving the explanation, we will read the first line of the file and if the year any other than current year, we will print as many... (1 Reply)
Discussion started by: vasuarjula
1 Replies

2. Shell Programming and Scripting

read from a specific pattern from one file and append it to another

Hi! Everyone, Say this file1 -------------- line 1 51610183 420001010 0010CTCTLEDPPOO 2151610183 line 2 2151610183 420001010 0030A2TH2 line 3 2151610183 420001010 0040A2TH3 line 4 2151610183 420001010 ... (0 Replies)
Discussion started by: kinkar_ghosh
0 Replies

3. Shell Programming and Scripting

Replace a particular pattern in a file

Hi , I have a requirement where i have this file abcd $$xyz=123 $$zef=789 $$mno=123 $$pqr=456 I need to replace $$pqr from 456 to a new value which will be present in a variable to me. I am not aware of sed and awk functionality. Can somebody please show me how to replace this... (6 Replies)
Discussion started by: lifzgud
6 Replies

4. Shell Programming and Scripting

Read file and for each line replace two variables, add strings and save output in another file

Hi All, I have a file, let's call it "info.tmp" that contains data like this .. ABC123456 PCX333445 BCD789833 I need to read "info.tmp" and for each line add strings in a way that the final output is put /logs/ua/dummy.trigger 'AAA00001.FTP.XXX.BLA03A01.xxxxxx(+1)' where XXX... (5 Replies)
Discussion started by: Andy_ARG
5 Replies

5. UNIX for Dummies Questions & Answers

find the file names having specified pattern at specified position in the current directory

I would need a command for finding first 15000 of the file names whose 25th postion is 5 in the current directory alone. I do have this painful command find . -name '5*' | head -15000 | cut -c3- please refine this. Of course the above command also searches in the sub directories... (3 Replies)
Discussion started by: vk39221
3 Replies

6. Shell Programming and Scripting

Finding 4 current files having specific File Name pattern

Hi All, I am trying to find 4 latest files inside one folder having following File Name pattern and store them into 4 different variables and then use for processing in my shell script. File name is fixed length. 1) Each file starts with = ABCJmdmfbsjop letters + 7 Digit Number... (6 Replies)
Discussion started by: lancesunny
6 Replies

7. Shell Programming and Scripting

awk - writing matching pattern to a new file and deleting it from the current file

Hello , I have comma delimited file with over 20 fileds that i need to do some validations on. I have to check if certain fields are null and then write the line containing the null field into a new file and then delete the line from the current file. Can someone tell me how i could go... (2 Replies)
Discussion started by: goddevil
2 Replies

8. Shell Programming and Scripting

Help with ksh-to read ip file & append lines to another file based on pattern match

Hi, I need help with this- input.txt : L B white X Y white A B brown M Y black Read this input file and if 3rd column is "white", then add specific lines to another file insert.txt. If 3rd column is brown, add different set of lines to insert.txt, and so on. For example, the given... (6 Replies)
Discussion started by: prashob123
6 Replies

9. Shell Programming and Scripting

Perl script to read string from file#1 and find/replace in file#2

Hello Forum. I have a file called abc.sed with the following commands; s/1/one/g s/2/two/g ... I also have a second file called abc.dat and would like to substitute all occurrences of "1 with one", "2 with two", etc and create a new file called abc_new.dat sed -f abc.sed abc.dat >... (10 Replies)
Discussion started by: pchang
10 Replies

10. Shell Programming and Scripting

Script to replace a string with pattern read from a file

I have two files blocks.txt and rules.txt. In blocks.txt i have the following entries Linux1 Linux2 Linux3 ..... Linux10 In rules.txt i have the lines where a filename pattern starts like 'blk-name.*' I want to replace 'blk-name' with the names read from blocks.txt file I tried... (2 Replies)
Discussion started by: Jag02
2 Replies
grcompiler(1)															     grcompiler(1)

NAME
grcompiler - Compile GDL into a TrueType Font SYNOPSIS
grcompiler [-d] [-D] [-g] [-n number] [-v number] [-w number] [-wall] [-q] gdl-file font-file [output-file] [output-fontname] Description Grcompiler compiles a Graphite Description Language description of the smarts for a font along with a TrueType Font to create a graphite font with graphite tables in it. -d Generate XML debugger file. -D Generate all debugger files. -g Permit and ignore invalid glyph definitions. -nnumber Set name table start location. -q Quiet mode (no messages except on error). -vnumber Set Silf table version number. -wnnnn Ignore warning with the given number. This option may be repeated. -wall Display all warnings. Environment grcompiler makes use of the following environment variables GDLPP Specifies the command to execute to run the GDL preprocessor Files gdlerr.txt Warnings and errors are output to this file. dbg_classes.txt Debug file that specifies the classes stored in the font in terms of their GDL source and containing glyph ids in hex. dbg_cmap.txt Debug file giving Unicode to glyph mapping of all the glyphs in the font and vice versa. dbg_enginecode.txt Debug file containing the action code and constraint code associated with each pass and rule in a pass. dbg_fsm.txt Debug file that gives the finite state machines of each pass and the rules referenced. For each pass, a mapping is given between glyph and column number. dbg_glyphattrs.txt Debug file containing all the glyph attributes and their names, along with values specified for each glyph. dbg_parsetree.txt Debug file giving the complete parse tree of the GDL source file. dbg_ruleprec.txt Debug file that lists the rules in precedence order (order in which they will be tested) for each pass. $_temp.gdl Debug file containing the output of gdlpp Author Martin Hosken <mhosken@users.sourceforge.net> $Date: 2012-05-29 11:36:50 $ grcompiler(1)
All times are GMT -4. The time now is 12:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy