Sponsored Content
Full Discussion: Parallel replacement string
Top Forums Shell Programming and Scripting Parallel replacement string Post 302944488 by forU on Tuesday 19th of May 2015 03:50:47 PM
Old 05-19-2015
this is just an example. I have hundreds of input files.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed problem - replacement string should be same length as matching string.

Hi guys, I hope you can help me with my problem. I have a text file that contains lines like this: 78 ANGELO -809.05 79 ANGELO2 -5,000.06 I need to find all occurences of amounts that are negative and replace them with x's 78 ANGELO xxxxxxx 79... (4 Replies)
Discussion started by: amangeles
4 Replies

2. Shell Programming and Scripting

String Replacement with Perl

I want to replace a string within a file using perl. We have a line that gets commented out, and I want to replace that line now matter how it was commented out. for example, I'd want to replace ###ES=PR1A with ES=PR1A or ##LJW(9/16/26)ES=PR1A with ES=PR1A I tried: perl... (4 Replies)
Discussion started by: Lindarella
4 Replies

3. Shell Programming and Scripting

Replacement of string

Hi I have a text file which contains the following. AAA,BBB,CCC,DDD AAA,BBB,CCC,DDD AAA,BBB,CCC,DDD How can I replace all CCC with 888, with other contents inside the file remain unchange? Please advice Desired output: AAA,BBB,888,DDD AAA,BBB,888,DDD AAA,BBB,888,DDD (1 Reply)
Discussion started by: c0384
1 Replies

4. Shell Programming and Scripting

String replacement

Hi I am new to shell scripting but i manage to do some simple things. I am trying to replace a string in one file. I am using sed to replace but it is not permanently writing to the file, rather it is temporary. I want to know whether is there any another method to replace a string in a file... (7 Replies)
Discussion started by: reddybs
7 Replies

5. Shell Programming and Scripting

String replacement

I have one string string1=user/password:IP_ADDR:Directory I need to replace string1 value like store into string2 string2=user password:IP_ADDR:Directory i.e replace "/" character by '<space>' character But i wouldn't use any file in the meantime. Please help me......................... (6 Replies)
Discussion started by: mnmonu
6 Replies

6. Shell Programming and Scripting

Issues with string replacement

I posted this issue a week or so ago and I still cant get the script to work. Here is what I have so far and what Im trying to do. #!/bin/ksh old="$1" new="$2" file=$3 grep $1 $3 > /dev/null if ;then cp $3 ${3}.bak sed "s/$1/$2/g" $3 > ${3}~ mv ${3}~ ${3} fithe script is... (5 Replies)
Discussion started by: gordonheimer
5 Replies

7. Shell Programming and Scripting

String replacement

Hi All, I have below file which has data in below format. #$ | AB_100 | AB_300 ()| AB_4 @*(% | AB-789 i want o/p as below format. | AB_100 | AB_300 | AB_4 | AB-789 So here there is no standard format. How we can achieve the same in unix ? Regards, (3 Replies)
Discussion started by: gander_ss
3 Replies

8. Shell Programming and Scripting

String replacement.

Dear Friends, I want to replace following line with given line. It should grep/search following string in a file (input.txt) M/M SRNO: 000M/6200-0362498 COSMETIC PRO MALE FEMALE Once found it should replace it to following string. T_DLHNNO: 000M/6200-0362498 ... (7 Replies)
Discussion started by: anushree.a
7 Replies

9. Shell Programming and Scripting

String replacement

Hi, I have a text file where all records come in one line (single line file), each record starts with 'BUCH' and ends with '@&' and if data is not there we get space instead. between '@&' and next record there might be some spaces, now I want to remove those spaces between '@&' and 'BUCH'. ... (4 Replies)
Discussion started by: maks475
4 Replies

10. Shell Programming and Scripting

String Replacement in a column

I have a text file with the following contents. I am trying to check the column "COL5". If the value is not "0" then I need to replace the value to NA only in COL5. The problem is that I don't have a clear delimiter here, I have only the column names. cat input.txt -08/27/14:08:30:01-- ... (5 Replies)
Discussion started by: ctrld
5 Replies
OCONV(1)						      General Commands Manual							  OCONV(1)

NAME
oconv - create an octree from a RADIANCE scene description SYNOPSIS
oconv [ -i octree | -b xmin ymin zmin size ][ -n objlim ][ -r maxres ][ -f ][ -w ][ - ] [ input .. ] DESCRIPTION
Oconv adds each scene description input to octree and sends the result to the standard output. Each input can be either a file name, or a command (enclosed in quotes and preceded by a `!'). Similarly, the octree input may be given as a command preceded by a `!'. If any of the surfaces will not fit in octree, an error message is printed and the program aborts. If no octree is given, a new one is created large enough for all of the surfaces. The -b option allows the user to give a bounding cube for the scene, starting at xmin ymin zmin and having a side length size. If the cube does not contain all of the surfaces, an error results. The -b and -i options are mutually exclusive. The -n option specifies the maximum surface set size for each voxel. Larger numbers result in quicker octree generation, but potentially slower rendering. Smaller values may or may not produce faster renderings, since the default number (6) is close to optimal for most scenes. The -r option specifies the maximum octree resolution. This should be greater than or equal to the ratio of the largest and smallest dimensions in the scene (ie. surface size or distance between surfaces). The default is 16384. The -f option produces a frozen octree containing all the scene information. Normally, only a reference to the scene files is stored in the octree, and changes to those files may invalidate the result. The freeze option is useful when the octree file's integrity and loading speed is more important than its size, or when the octree is to be relocated to another directory, and is especially useful for creating library objects for the "instance" primitive type. If the input octree is frozen, the output will be also. The -w option suppresses warnings. A hyphen by itself ('-') tells oconv to read scene data from its standard input. This also implies the -f option. The only scene file changes that do not require octree regeneration are modifications to non-surface parameters. If the coordinates of a surface are changed, or any primitives are added or deleted, oconv must be run again. Programs will abort with a "stale octree" message if they detect any dangerous inconsistencies between the octree and the input files. Although the octree file format is binary, it is meant to be portable between machines. The only limitation is that machines with radi- cally different integer sizes will not work together. For the best results, the -f option should be used if an octree is to be used in different environments. DIAGNOSTICS
There are four basic error types reported by oconv: warning - a non-fatal input-related error fatal - an unrecoverable input-related error system - a system-related error internal - a fatal error related to program limitations consistency - a program-caused error Most errors are self-explanatory. However, the following internal errors should be mentioned: Too many scene files Reduce the number of scene files by combining them or using calls to xform(1) within files to create a hierarchy. Set overflow in addobject (id) This error occurs when too many surfaces are close together in a scene. Either too many surfaces are lying right on top of each other, or the bounding cube is inflated from an oversized object or an improper -b specification. If hundreds of triangles come together at a common vertex, it may not be possible to create an octree from the object. This happens most often when inane CAD systems create spheres using a polar tessellation. Chances are, the surface "id" is near one of those causing the problem. Hash table overflow in fullnode This error is caused by too many surfaces. If it is possible to create an octree for the scene at all, it will have to be done in stages using the -i option. EXAMPLE
To add book1, book2 and a transformed book3 to the octree ``scene.oct'': oconv -i scene.oct book1 book2 '!xform -rz 30 book3' > newscene.oct AUTHOR
Greg Ward NOTES
In the octree, the names of the scene files are stored rather than the scene information. This means that a new octree must be generated whenever the scene files are changed or moved. Also, an octree that has been moved to a new directory will not be able to find scene files with relative pathnames. The freeze option avoids these problems. make(1) or rad(1) can be used to automate octree creation and mainte- nance. SEE ALSO
getbbox(1), getinfo(1), make(1), obj2mesh(1), rad(1), rpict(1), rvu(1), rtrace(1), xform(1) RADIANCE
8/15/95 OCONV(1)
All times are GMT -4. The time now is 01:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy