Sponsored Content
Top Forums Shell Programming and Scripting update a file with values from other file in shell bash Post 302211447 by teodora on Thursday 3rd of July 2008 11:05:38 AM
Old 07-03-2008
update a file with values from other file in shell bash

Hello

I need to write a shell script to update properties between files.

I have 2 files as follow:

file1

urlWebserviceCheckAddress^=McoConfigGlobal.commonGLOBALUrlWebservice


file 2

urlWebserviceCheckAddress=http://localhost:8080/tags

Both files containt the same properties (left side of =)

I need to update the value of properties in file 2 with values of the same property from file 1.
If value of property in file 1 begins with McoConfigGlobal I need also to add ^ character before = (in file 2). At the end, the properties in both files must have the same values.

Image thanks in advance Image
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[BASH] mapping of values from file line into variables

Hello, I've been struggling with this for some time but can't find a way to do it and I haven't found any other similar thread. I'd like to get the 'fields' in a line from a file into variables in just one command. The file contains data with the next structure:... (4 Replies)
Discussion started by: semaler
4 Replies

2. UNIX for Dummies Questions & Answers

Passing values from file into array in Bash

Hi, I'm trying to write a bash script that takes a file and passes each line from the file into an array with elements separated by column. For example: Sample file "file1.txt": 1 name1 a first 2 name2 b second 3 name3 c third and have arrays such as: line1 = ( "1" "name1" "a"... (3 Replies)
Discussion started by: ShiGua
3 Replies

3. Shell Programming and Scripting

Update the table using values from a csv file

i want to run update query for oracle which is in up.sql taking values from a.csv. I have implemented shell script to do it. extn="perl" ls -1 | while read file do echo "$file,$extn" > a.csv done up.sql contains update file_list set filename=$1 where extn=$2; The code to update is... (2 Replies)
Discussion started by: millan
2 Replies

4. Shell Programming and Scripting

Find and extract values from one file and update other

Gents, Kindly can you help me to update a file extracting the data from other file. I have: file1 The key in this file is substr($0,4,21), and I need to update the columns 6 and 7 using the information for file2. S 21133.00 21535.00 1 0 919088.8 1843754.5 ... (2 Replies)
Discussion started by: jiam912
2 Replies

5. UNIX for Dummies Questions & Answers

Reading XML file and print the values in the text file using Linux shell script

hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file <sequence> <Filename>aldorzum.doc</Filename> <DivisionCode>US</DivisionCode> <ContentType>Template</ContentType> <ProductCode>VIMZIM</ProductCode> </sequence>... (1 Reply)
Discussion started by: sravanreddy
1 Replies

6. Shell Programming and Scripting

How to retrieve values from XML file and update them in the same position! PLEASE HELP?

Good Day All Im quiet new to ksh scripting and need a bit of your help. I am attempting to write a script that reads in an XML and extracts certain field values from an XML file. The values are all alphanumeric and consist of two components: e.g "Test 1". I need to to create a script that... (2 Replies)
Discussion started by: JulioAmerica
2 Replies

7. Shell Programming and Scripting

Bash append values if keywords are present in the file

Hi Team, i have a web ui where user will be passing values and the output will be saved to a file say test with the following contents . These below mentioned values will change according to the user_input Just gave here one example Contents of file test is given below Gateway... (7 Replies)
Discussion started by: venkitesh
7 Replies

8. Shell Programming and Scripting

Assign Values to a Variable in While Loop and Update the File

Hello, Could anyone please help me with Assigning a value to variable and then updating the value in the original file IFS='|' while read -r Serial_ID JOB_NAME STATUS do if then echo "Perform Fuctions" ???Assign STATUS to COMPLETED and Update File??? done <File (7 Replies)
Discussion started by: infernalhell
7 Replies

9. Shell Programming and Scripting

Bash to update file on prefix match in two directories

I am trying to use bash to loop through a directory /path/to/data using a prefix match from /path/to/file. That match is obtained and works using the code below (in green)... what I can not seem to do is populate or update the corresponding prefix_file.txt in /path/to/data with the values in each... (3 Replies)
Discussion started by: cmccabe
3 Replies
html2textrc(5)							File Formats Manual						    html2textrc(5)

NAME
html2textrc - formatting properties file for html2text(1) SYNOPSIS
Key [ = | : ] Value DESCRIPTION
The html2textrc(5) file defines a set of formatting properties used by the html2text(1) utility, that overrides the program's built-in for- matting defaults. Each line of the html2textrc(5) file is either a formatting property or a comment. Lines with a leading "#" or "!" (i.e. the first non-space character is a "#" or a "!") and blank lines (i.e. a line consisting only of white-space characters), are considered comments and ignored. Everything else is literary interpreted by the parser as a formatting prop- erty, where a string-type property value may also be empty (unsets default value). Both, the property key and the property value, may con- tain C-style escape sequences to mask meta characters. A property definition line consists of: (1) Optional leading space, (2) the property key (a sequence of non-space characters except "=" and ":") as described below, (3) an optional space, (4) an optional "=" or ":", (5) optional space, (6) the property value as described below. Everything up to the next newline is interpreted literary as the value of the specified element. Literary meant leading white-space must be quoted with backslashes (i.e. " "). Be aware not to include unwanted trailing white-space characters. OPTIONS
The following is the list of valid formatting properties, together with their default values. If the -style command line option of html2text(1) is used, different default values apply. Curly braces indicate alternatives, e.g. {A B}C stands for AC or BC. DOCUMENT.{vspace.{before after} indent.{left right}} = 0 Specifies how many blank lines are inserted before and after, and how many blank columns are inserted to the left and to the right of the formatted document. (Numeric.) BODY.{vspace.{before after} indent.{left right}} = 0 Same for the document body. (Since the document body is currently the only document part that is rendered, it is virtually the same whether you specify DOCUMENT or BODY). (Numeric.) {OL UL DIR MENU DL}.vspace.{before between after} = 0 Specifies how many blank lines are inserted before a list, between the individual list items, and after the list. (Numeric.) {OL UL DIR MENU}.indents = 6 Specifies by how deep list items are indented. If an item bullet would not fit into the space created by the indentation, then the indentation is automatically increased such that the bullet fits in (relevant for relatively wide bullets, e.g. roman numbers). If N blank-separated integers are specified instead of one, then the first N-1 integers specify indentation for the first N-1 list nesting levels, while the last integer specifies the indentation for nesting levels N and higher. (Numeric.) {UL DIR}.default_types = DISC CIRCLE SQUARE Specifies the default list type (i.e. the bullet style), if the HTML list tag does not specify an explicit type. Legal values are NO_BULLET, DISC, SQUARE, CIRCLE, CUSTOM1, CUSTOM2 and CUSTOM3. If more than one value is specified, then the values apply for the respective list nesting levels (see indents). (Option.) MENU.default_types = NO_BULLET Same for <MENU>, but here the default is NO_BULLET. (Option.) LI.{disc square circle custom1 custom2 custom3}_bullet = {* # o + - ~} Specifies the strings used as list item bullets. (String.) {DT DD}.{vspace.{before after} indent.{left right}} = 0 Specifies how many blank lines are inserted before and after, and how many blank columns are inserted to the left and to the right of each <DT> or <DD> element. (Numeric.) HR.marker = = Specifies the character to use for horizontal rules. (String.) HR.{vspace.{before after} indent.{left right}} = 0 Specifies how many blank lines are inserted before and after, and how many blank columns are inserted to the left and to the right of the horizontal rule. (Numeric.) {H1 H2 H3 H4 H5 H6}.prefix = {****** ***** **** *** ** *} Specifies how headings are decorated with a prefix. (The default values have a trailing blank, e.g. "****** ".) (String.) {H1 H2 H3 H4 H5 H6}.suffix = {****** ***** **** *** ** *} Specifies how headings are decorated with a suffix. (The default values have a leading blank, e.g. " ******".) (String.) {H1 H2 H3 H4 H5 H6}.vspace.{before after} = 0 Specifies how many blank lines are inserted before and after headings. (Numeric.) {PRE P}.{vspace.{before after} indent.{left right}} = 0 Specifies how many blank lines are inserted before and after, and how many blank columns are inserted to the left and to the right of these items. (Numeric.) {BLOCKQUOTE ADDRESS}.{vspace.{before after} indent.{left right}} = {0 0 5 5} Specifies how many blank lines are inserted before and after, and how many blank columns are inserted to the left and to the right of these items. (Numeric.) TABLE.vspace.{before after} = 0 Specifies how many blank lines are inserted before and after tables. (Numeric.) {H1 H2 H3 H4 H5 H6}.attributes = BOLD Specifies the cell attributes for headings. The value is a sequence of NONE, BOLD, UNDERLINE and STRIKETHROUGH. (Option.) {TT I BIG SMALL SUB SUP DFN CODE SAMP KBD CITE}.attributes = NONE Specifies the cell attributes for these text items. Legal values are: NONE, BOLD, UNDERLINE or STRIKETHROUGH. (Option.) U.attributes = UNDERLINE Same for <U> elements, but with a different default value. (Option.) {B EM STRONG}.attributes = BOLD Same for these elements, but with a different default value. (Option.) STRIKE.attributes = STRIKETHROUGH Same for <STRIKE> elements, but with a different default value. (Option.) A.attributes.{internal_link external_link} = UNDERLINE Specifies the cell attributes for links. A link is an <A> element that has an "HREF" attribute. An internal link is a link whose "HREF" attribute starts with a hash character (e.g. "<A href="#42">"). Legal values are again NONE, BOLD, UNDERLINE and STRIKETHROUGH. (Option.) IMG.replace.{all noalt} = unset Specifies the string used to replace all <IMG> elements, or those without an "ALT" attribute set. (String.) IMG.alt.{prefix suffix} = {[ ]} Specifies how the values (if any) of IMG elements' "ALT" attributes are marked. (String.) AUTHOR
Current maintainer and primary download location for html2text is: Martin Bayer <mbayer@zedat.fu-berlin.de> http://userpage.fu-berlin.de/~mbayer/tools/ <> SEE ALSO
html2text(1) 2001-06-11 html2textrc(5)
All times are GMT -4. The time now is 06:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy