Sponsored Content
Full Discussion: Condition problem
Top Forums Shell Programming and Scripting Condition problem Post 302972564 by RudiC on Saturday 7th of May 2016 04:22:58 AM
Old 05-07-2016
In reaction to a recent PM:


Sorry but I'm stuck.

I'm afraid I can't help any further unless you give a clear picture of the overall problem. Appreciating that English might not be your first language (it's not mine either) and all the possible problems herewith, I do not understand what you need and where you're stuck.

In my post#4 I asked you to rephrase the problem AND supply decent, meaningful samples, which you did reluctantly only, and in pieces. Why can't you show the entire picture and the underlying structures?
- OS and shell used?
- What tools would be preferred (shell? awk/sed/perl? other?) or excluded?
- How many input files (you supplied several but different "file1.txt")?
- How many output files per input file?
- What's the logics/algorithms connecting the two?
- Attempts at solving the problem?
- Errors/messages/behaviour encountered when running either attempt?

Without a clear understanding of the situation, everybody (not only) in here will be shooting in the dark (which I did multiple times), and coming up with a fit solution would be sheer coincidence.

Did you even consider adapting the proposals supplied?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

If condition problem

Hi Guys, I want to use if conition for my script. Before I used it tried it with some small test scripts. But it was not succeeded. My script and screen output as follows, Script: echo 'Do you think Yes or No (y/n) : ' read ans echo You input anser as $ans ans1=y if ( $ans == $ans1... (5 Replies)
Discussion started by: maheshsri
5 Replies

2. Shell Programming and Scripting

problem with if condition

hi, :) pls consider the following if statement if //g') ] then ........ else ....... when i execute the script i am getting the following error '(' unexpected I am not able to find the mistake. could anybody tell where i did mistake. cheers RRK (13 Replies)
Discussion started by: ravi raj kumar
13 Replies

3. Shell Programming and Scripting

problem in if condition

hi, actully i need the belp for the below. host_list=" Host1 host2 host3 host4 " n=`hostname` i need to put the condition like the below if n is among the host mention in the host_list if then #some stugg else # some other stuff fi (1 Reply)
Discussion started by: mail2sant
1 Replies

4. Shell Programming and Scripting

problem in if then else condition

Hi , I am trying the following simple script . But it is always giving 1 output. Dont know why #!/bin/sh find . -name "a.log" if ; then echo "1" else echo "0" fi Kindly advice. it is giving 1 output even when the a.log file is not there (26 Replies)
Discussion started by: himvat
26 Replies

5. Shell Programming and Scripting

Problem in using AND OR condition together

a=rhino b=crocodil c=testsc if && "$c" = testsc ] then echo "Test #5 succeeds." else echo "Test #5 fails." fi i need to test or condition before check the output with AND condition. ur help is much appreciated... (11 Replies)
Discussion started by: gokulraj23
11 Replies

6. Shell Programming and Scripting

Problem in if condition

Hi all, I have task to delete two different files from all file system. one is core file & other is old file. i can delete core file but for old file i have to mv in different location. i wrote a script but it is not working. i have a two variables in this script first one is delcnt &... (6 Replies)
Discussion started by: dravi_laxmi
6 Replies

7. Shell Programming and Scripting

If condition problem

Hi, I need to use if condition for search a file pattern on a particular location. cd $file_Path if || then do this else do that fi Can someone help me with the if part, how i can put those conditions? make sure format should be *.file* and *.file file is a keyword which i... (5 Replies)
Discussion started by: amit.mathur08
5 Replies

8. Shell Programming and Scripting

Problem with IF condition .

Hi i am writing a script where i am running , 5 scripts together in 1 script . Now what i want is when these 5 scripts run completely , i should execute some other commands like i have compile the data etc. I have have 5 echo statements at the end of all those scripts . Like echo "1 is done" in... (1 Reply)
Discussion started by: honey26
1 Replies

9. Shell Programming and Scripting

If condition problem

Hi All, I am using below if condition to check whether null is passed as a parameter to the program if or ; then echo "ABC">>$FILE else echo "CDF">>$FILE fi However it is saying me null=null command not found . Please help me with this (9 Replies)
Discussion started by: Hypesslearner
9 Replies
PCOMB(1)						      General Commands Manual							  PCOMB(1)

NAME
pcomb - combine RADIANCE pictures SYNOPSIS
pcomb [ -h ][ -w ][ -x xres ][ -y yres ][ -f file ][ -e expr ] [ [ -o ][ -s factor ][ -c r g b ] input .. ] DESCRIPTION
Pcomb combines equal-sized RADIANCE pictures and sends the result to the standard output. By default, the result is just a linear combina- tion of the input pictures multiplied by -s and -c coefficients, but an arbitrary mapping can be assigned with the -e and -f options. Neg- ative coefficients and functions are allowed, and pcomb will produce color values of zero where they would be negative. The variables ro, go and bo specify the red, green and blue output values, respectively. Alternatively, the single variable lo can be used to specify a brightness value for black and white output. The predefined functions ri(n), gi(n) and bi(n) give the red, green and blue input values for picture n. To access a pixel that is nearby the current one, these functions also accept optional x and y offsets. For example, ri(3,-2,1) would return the red component of the pixel from picture 3 that is left 2 and up 1 from the current position. Although x offsets may be as large as width of the picture, y offsets are limited to a small window (+/- 32 pixels) due to efficiency considera- tions. However, it is not usually necessary to worry about this problem -- if the requested offset is not available, the next best pixel is returned instead. For additional convenience, the function li(n) is defined as the input brightness for picture n. This function also accepts x and y off- sets. The constant nfiles gives the number of input files present, and WE gives the white efficacy (lumens/brightness) for pixel values, which may be used with the -o option or the le(n) values to convert to absolute photometric units (see below). The variables x and y give the current output pixel location for use in spatially dependent functions, the constants xmax and ymax give the input resolution, and the con- stants xres and yres give the output resolution (usually the same, but see below). The constant functions re(n), ge(n), be(n), and le(n) give the exposure values for picture n, and pa(n) gives the corresponding pixel aspect ratio. Finally, for pictures with stored view parameters, the functions Ox(n), Oy(n) and Oz(n) return the ray origin in world coordinates for the current pixel in picture n, and Dx(n), Dy(n) and Dz(n) return the normalized ray direction. In addition, the function T(n) returns the distance from the origin to the aft clip- ping plane (or zero if there is no aft plane), and the function S(n) returns the solid angle of the current pixel in steradians (always zero for parallel views). If the current pixel is outside the view region, T(n) will return a negative value, and S(n) will return zero. The -h option may be used to reduce the information header size, which can grow disproportionately after multiple runs of pcomb and/or pcompos(1). The -w option can be used to suppress warning messages about invalid calculations. The -o option indicates that original pixel values are to be used for the next picture, undoing any previous exposure changes or color correction. The -x and -y options can be used to specify the desired output resolution, xres and yres, and can be expressions involving other constants such as xmax and ymax. The constants xres and yres may also be specified in a file or expression. The default output resolution is the same as the input resolution. The -x and -y options must be present if there are no input files, when the definitions of ro, go and bo will be used to compute each out- put pixel. This is useful for producing simple test pictures for various purposes. (Theoretically, one could write a complete renderer using just the functional language...) The standard input can be specified with a hyphen ('-'). A command that produces a RADIANCE picture can be given in place of a file by preceeding it with an exclamation point ('!'). EXAMPLES
To produce a picture showing the difference between pic1 and pic2: pcomb -e 'ro=ri(1)-ri(2);go=gi(1)-gi(2);bo=bi(1)-bi(2)' pic1 pic2 > diff Or, more efficiently: pcomb pic1 -s -1 pic2 > diff To precompute the gamma correction for a picture: pcomb -e 'ro=ri(1)^.4;go=gi(1)^.4;bo=bi(1)^.4' inp.hdr > gam.hdr To perform some special filtering: pcomb -f myfilt.cal -x xmax/2 -y ymax/2 input.hdr > filtered.hdr To make a picture of a dot: pcomb -x 100 -y 100 -e 'ro=b;go=b;bo=b;b=if((x-50)^2+(y-50)^2-25^2,0,1)' > dot AUTHOR
Greg Ward SEE ALSO
getinfo(1), icalc(1), pcompos(1), pfilt(1), rpict(1) RADIANCE
8/31/96 PCOMB(1)
All times are GMT -4. The time now is 09:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy