Sponsored Content
Top Forums Shell Programming and Scripting XML variable for input in same input file Post 302877786 by Yoda on Tuesday 3rd of December 2013 10:46:20 AM
Old 12-03-2013
Assuming you want to extract the value and use it later:
Code:
csp_id_val=$( awk '/CSP_ID/{gsub(/.*=\"|".*/,X);print;exit}' file.xml )

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get variable input from a file

Hi guys, I want to input some variables from a file. I tried it with following script, for i in 1 2 3 4 do read varible1 varible2 < ddd.txt echo $varible1 $varible2 done ... (1 Reply)
Discussion started by: maheshsri
1 Replies

2. Shell Programming and Scripting

Reading specific contents from 1 input files and appending it to another input file

Hi guys, I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help. I have 2 input files (example given below) Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
Discussion started by: sksahu
5 Replies

3. Shell Programming and Scripting

How to get input xml file as XMLout. output.

Hi , I am trying to get an reference of a XML formatted data using XML::Simple::XMLin and again trying to retrive the XML data as it was before using XML::Simple::XMLout. But finding a deviation in the format can any pls help me out. Input file sr.xml <?xml version="1.0"... (0 Replies)
Discussion started by: srkelect
0 Replies

4. Shell Programming and Scripting

Reading from a File and Using as an Input variable

I need to know how the the string constant from Input File should be read and provide as input data for the script . INPUT FILE CONST VARIABLE myname=/root/dir/syslog/myname1 myname=/root/dir/syslog/myname2 myname=/root/dir/syslog/myname3 urname=/root/dir/syslog/urname1... (6 Replies)
Discussion started by: baraghun
6 Replies

5. UNIX for Dummies Questions & Answers

SQL Script to use variable value from input file

Here is the requirement, When I run the "run file KSH (sql)", it should substitute '${pCW_Bgn_DT}' with 201120 and '${pCW_End_DT}' with 201124 Input File ---------- $ cat prevwk.dat 201124 20110711 run file KSH (sql) ------------------ In this file, I want to use the variables... (1 Reply)
Discussion started by: shanrice
1 Replies

6. Shell Programming and Scripting

Script to delete files with an input for directories and an input for path/file

Hello, I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get. :wall: I regularly need to delete files from many directories. A file with the same name may exist any number of times in different subdirectories.... (3 Replies)
Discussion started by: *ShadowCat*
3 Replies

7. Shell Programming and Scripting

Read input files and merge them in given order and write them to input one param or one file

Dear Friends, I am looking for a shell script to merge input files into one file .. here is my idea: 1st paramter would be outfile file (all input files content) read all input files and merge them to input param 1 ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
Discussion started by: hyd1234
4 Replies

8. Homework & Coursework Questions

Removing punctuations from file input or standard input

Just started learning Unix and received my first assignment recently. We haven't learned many commands and honestly, I'm stumped. I'd like to receive assistance/guidance/hints. 1. The problem statement, all variables and given/known data: How do I write a shell script that takes in a file or... (4 Replies)
Discussion started by: fozilla
4 Replies

9. Shell Programming and Scripting

Read xml file till script finds separation and run again for next input and so on

Hi All, I have one query, I managed to run script with user inputs through command line or with 1 file. But I need to read a txt file/xml file in which user can mention multiple sets of answers and script should run for each set till it reach the EOF. Thanks in advance for example, the file... (3 Replies)
Discussion started by: rv_champ
3 Replies

10. Shell Programming and Scripting

Can't input large file to variable

I have a file that I'm trying to place into a variable. I've tried the following: DATE=`date +%Y%m%d` filez=$(cat /tmp/Test_$DATE.txt)DATE=`date +%Y%m%d` filez=$(</tmp/Test_$DATE.txt)DATE=`date +%Y%m%d` filez=$(`cat /tmp/Test_$DATE.txt`)None of these lines allows the file to go into the... (3 Replies)
Discussion started by: newbie2010
3 Replies
PKGBSDF(1)						      General Commands Manual							PKGBSDF(1)

NAME
pkgBSDF - package BSDFs provided as XML for Radiance SYNOPSIS
pkgBSDF [ -i ][ -s ] bsdf.xml .. DESCRIPTION
PkgBSDF takes one or more XML files, each describing the bidirectional scattering distribution function of a surface or geometric system, and packages them into RADIANCE scene descriptions. If the input file(s) do not begin with a '.' or '/', the directories in the RAYPATH environment variable will be searched. One rectangle is produced for each BSDF that has no detail geometry and/or no rear-side reflectance distribution. If both front and back reflectance distributions are present with detail geometry, then two rectangles will be used to sand- wich the geometry extracted from the BSDF file. The front surface will always be centered just in front of the origin facing the positive Z-direction, with "up" in the positive Y-direction. The back surface, if present, will parallel the front surface at a distance slightly greater than the BSDF system thickness. Scene units will always be in meters. The -i option causes pkgBSDF to produce frozen octree instances for any detail geometry, which may reduce memory requirements in scenes with many references to the same complex BSDF object. Normally, pkgBSDF produces one RADIANCE scene file for each XML input, replacing the required '.xml' suffix with '.rad' in the same direc- tory. The -s option sends the RADIANCE scene description to the standard output rather than writing it to a file, but only works for a single XML input. Any instance octree is still written out to a file generated by replacing the '.xml' suffix with '.oct' in the same directory. EXAMPLE
Package all the XML files in the current directory as Radiance scene files, employing frozen octree instances for any detail geometry: pkgBSDF -i *.xml AUTHOR
Greg Ward SEE ALSO
genBSDF(1), oconv(1), xform(1) RADIANCE
6/23/2011 PKGBSDF(1)
All times are GMT -4. The time now is 07:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy