Sponsored Content
Top Forums Shell Programming and Scripting Help with extracting words from fixed length files Post 302459779 by kurumi on Tuesday 5th of October 2010 10:59:50 AM
Old 10-05-2010
Code:
$ ruby -ane 'puts $F.last if $_[/^HDR/]' file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

creating a fixed length output from a variable length input

Is there a command that sets a variable length? I have a input of a variable length field but my output for that field needs to be set to 32 char. Is there such a command? I am on a sun box running ksh Thanks (2 Replies)
Discussion started by: r1500
2 Replies

2. Shell Programming and Scripting

sort on fixed length files

Hi How to sort a fixed length file on a given char range and just display the duplicates. I did search for man sort to find any option but could find any.,something similar to cut -c 1-5,25-35. I have alternate way of doing this by using combination of cut,awk. but this creates extra temp... (6 Replies)
Discussion started by: sach_in
6 Replies

3. Shell Programming and Scripting

Awk with fixed length files

Hi Unix Champs, I want to awk on a fixed length file. Instead if the file was a delimited file, then I could have used -F and then could have easily done manipulation on the fields. How do i do the same in case of fixed length file? Thanks in Advance. Regards. (7 Replies)
Discussion started by: c2b2
7 Replies

4. Shell Programming and Scripting

Join two fixed length Files in Unix

Hi, Can we join two fixed length files in Unix using JOIN command? Is there any other command to accomplish the same? Thanks, G.Harikrishnan (6 Replies)
Discussion started by: gharikrishnan
6 Replies

5. Shell Programming and Scripting

Awk - Working with fixed length files

OK I am somewhat new to UNIX programming please see what you can do to help. I have a flat file that is a fixed length file containing different records based on the 1st character of each line. The 1st number at the beginning of the line is the record number, in this case it's record #1. I... (3 Replies)
Discussion started by: ambroze
3 Replies

6. UNIX for Dummies Questions & Answers

What the command to find out the record length of a fixed length file?

I want to find out the record length of a fixed length file? I forgot the command. Any body know? (9 Replies)
Discussion started by: tranq01
9 Replies

7. Shell Programming and Scripting

Make variable length record a fixed length

Very, very new to unix scripting and have a unique situation. I have a file of records that contain 3 records types: (H)eader Records (D)etail Records (T)railer Records The Detail records are 82 bytes in length which is perfect. The Header and Trailer records sometimes are 82 bytes in... (3 Replies)
Discussion started by: jclanc8
3 Replies

8. Shell Programming and Scripting

changing a variable length text to a fixed length

Hi, Can anyone help with a effective solution ? I need to change a variable length text field (between 1 - 18 characters) to a fixed length text of 18 characters with the unused portion, at the end, filled with spaces. The text field is actually field 10 of a .csv file however I could cut... (7 Replies)
Discussion started by: dc18
7 Replies

9. UNIX for Dummies Questions & Answers

Fixed length file extracting values in columns

How do I extract values in a few columns in a row of a fixed length file? If there are 8 columns and I need to extract values of 2nd,4th and 6 th columns, how do i do that? I used cut command, this I used only for one column. How do I do it more than one column? The below command will give... (1 Reply)
Discussion started by: princetd001
1 Replies

10. Shell Programming and Scripting

Extracting fixed length number from a text file

Hi, I have a text file with sample records as CASE ID: 20170218881083 Original presentment record for ARN not found for Re-presentment I want to extract the 23 digit number from this file. I thought of using grep but initially couldn't extract the required number. However, after... (16 Replies)
Discussion started by: dsid
16 Replies
pfsouthdrhtml(1)					      General Commands Manual						  pfsouthdrhtml(1)

NAME
pfsouthdrhtml - Create a web page with an HDR viewer SYNOPSIS
pfsouthdrhtml [<page_name>] [--quality <1-5>] [--image-dir <directory_name>] [--page-template <template_file>] [--image-template <tem- plate_file>] [--object-output <file_name.js>] [--html-output <file_name.html>] DESCRIPTION
The command creates in the current directory an HTML web page containing multi-exposure HDR viewer. The multi-exposure viewer displays a portion of the available dynamic range with minimum contrast distortions and provides a slider control to move the dynamic range window towards brighter or darker tones. The interface is very similar to pfsview, which is a pfstools application for displaying HDR images. The web page employs only JavaScript and CSS opacity property and does not require Java applets or the Flash plugin. Note that because this techniques encodes 20-60 exposures using only few images, the displayed exposures may not be identical to the exposures that are shown in pfsview. For examples and more information, visit http://pfstools.sourceforge.net/hdrhtml/. <page_name> specifies the file name, of the web page to be generated. If <page_name> is missing, the file name of the first image with .html extension will be used. The command can take as input several images and put them all on the same web page. For each image, its file name (from the FILE_NAME tag in the pfsstrem) without extension and a leading path will be used as a name for all JavaScript variables corresponding to that image. If the filename contains illegal characters (such as space, '-', '[', etc), these will be converted to '_'. --quality <1-5>, -q <1-5> Quality of the interpolated exposures, from the worst (1) to the best (5). The default is 2, which is sufficient for most applica- tions. Higher quality will introduce less distortions in the brightest and the darkest tones, but will also generate more images. More images means that there is more data that needs to be transferred to the web-browser, making HDR viewer less responsive. --image-dir <directory_name>, -d <directory_name> Specify where to store the resulting image files. Links to images in HTML will be updated accordingly. This must be a relative path and the directory must exist. Useful to avoid clutter in the current directory. --page-template <template_file>, -p <directory_name>, --image-template <template_file>, -i <template_file> Replaces the template files used to generate an HTML web page. The template files contain all HTML and JaveScript code with special keywords (@keyword@) that are replaced with image specific data, such as width, height, image base name, etc. The default template files can be found in INSTALL_DIR/share/pfstools/hdrhtml_*_templ.html. See TEMPLATE FILE FORMAT below more details. --object-output <file_name.js>, -o <file_name.js> Store JavaScript objects (hdr_<base_name>) associated with each image in a separate file. This is useful if you want to script cre- ating HTML pages. --html-output <file_name.html>, -l <file_name.html> Store HTML code that shows HDRHTML viewer for each image in a separate file. This is useful if you want to script creating HTML pages. TEMPLATE FILE FORMAT
pfsouthdrhtml uses two template files hdrhtml_page_templ.html and hdrhtml_image_templ.html, located in INSTALL_DIR/share/pfstools/, to gen- erate a web page with an HDR HTML viewer. The 'page' file contains the HTML of the entire web page and the 'image' file is used to paste a viewer code for a single image. You can replace one or both these templates with your own using --page-template and --image-template options. Each template contains HTML code with additional keywords surrounded by @ marks (@keyword@), which are replaced with HDR HTML specific code. Most of the keywords are self explanatory, therefore only the most important are described below. @hdr_img_def@ JavaScript objects that must be put in the 'body' section before any images. These define all the parameters needed to control HDR HTML viewer. @cf_array_def@ Pre-computed array of opacity coefficients. The same array is used for all images that use the same quality setting. Currently only one such array could be used per web-page, so images generated with different quality setting cannot be mixed on a single web page. @image_htmlcode@ or @image_htmlcode[base_name]@ Inserts HTML code of all images or a single image with the base_name (name with no file extension) specified as a parameter. This should be put where HDR HTML viewer should be located. EXAMPLES
pfsin memorial.hdr | pfshdrhtml memorial_church Generates a web page memorial_church.html with a set of images memorial_church_*.jpg in the current directory. pfsin ~/hdr_images/*.exr | pfssize --maxx 512 --maxy 512 | pfsouthdrhtml hdr_images Generate a web page with all OpenEXR images from ~/hdr_images/. The images are resized so that they are not larger than 512x512. SEE ALSO
pfsin(1) pfsout(1) BUGS
Please report bugs and comments to the discussion group http://groups.google.com/group/pfstools pfsouthdrhtml(1)
All times are GMT -4. The time now is 07:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy