translation of ' in system () or connecting strings


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting translation of ' in system () or connecting strings
# 1  
Old 09-16-2009
translation of ' in system () or connecting strings

Hello,

I have a problem with the translation of the following command. In Shell the radiance-command work like that:
Code:
gensurf seitenwand rollerblind1 '-0.95*s' '0.046' '2.85-'$1'*t' 1 1

But I don't know how to deal with this command in system().

I tried this:
Code:
befehl1="gensurf seitenwand rollerblind1 '-0.95*s' '0.046' '2.85-"$1"*t' 1 1 >temp.rad"

But it is just printing exactly the command with the replaced $1. How can I solve the '. Can someone tell me maybe a possibility to connect strings or another solution?

Thanks for the help,
Sandra
# 2  
Old 09-16-2009
Can you show us the line of your code that contains the system() call?
# 3  
Old 09-16-2009
of course. sorry:

Code:
cat runde.txt |awk '{
                               if ($5==2) {
                                                   dataname_v= " $1 "_" $4 "_adjust.rad
                                                   befehl1="gensurf seitenwand rollerblind1 '-0.95*s' '0.046' '2.85-"$7"*t' 1 1 > dataname_v"
                                                   system(befehl)
                                          }
                    }'

Thanks for help. So the problem is the '-sign, because in awk it is used for '{ and always when I am changing the befehl-variable it tells me "unexpected end of file" or it is just printing the command in the temp.rad...
And if I am changing it into:

Code:
befehl1="gensurf seitenwand rollerblind1 '-0.95*s' '0.046' '2.85-"$7"*t' 1 1" ">" dataname_v 
system(befehl)

It is just printing some results on the screen, but not into the files...

So I thought of connecting the strings somehow? Or is there maybe another solution?

Last edited by ergy1983; 09-17-2009 at 12:12 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Connecting system to Virtual HMC

Hi, I just successfully build a Virtual Machine in virtual box with Perfectly running HMC v7. I have a IBM eServer pSeries Model 630 Model 6C4 (Power 4) i.e. 7024-6C4. I am not able to have it connect to the HMC console on the Virtual Box. Can anyone help me on how to connect it to the... (8 Replies)
Discussion started by: uzair_rock
8 Replies

2. Programming

gfortran not connecting to system libraries

Hi ! I have one program made of several sub programs which I am trying to compile with gfortran on Fedora 14 in my system. The program was originally written in Fortran 77 and compilation command used to be - fort77 -O2 -f -w -o life life_com.f lifetime.f minuit.f tek_life.f utilities.f... (0 Replies)
Discussion started by: cylab123
0 Replies

3. UNIX Desktop Questions & Answers

Text Translation

hi all, Im a unix newbie and Im trying to find and replace text and I been looking at these posts since 7 am and I still dont see what Im after. Here is the task at hand. Im trying to translate few lines by doing cat <file> and here is what Im doing <file> 20110228 Mike Original apartment... (4 Replies)
Discussion started by: PG3
4 Replies

4. UNIX for Dummies Questions & Answers

AIX to HP-UX translation please

I have been looking up the allocated space, free space and the contents (raw, jfs, paging) of the logical volumes in AIX servers. I have been using lsvg and lsvg -l (server name). What is the HP-UX equivalent to that? I was given this command also so I would not have to type in each volume group... (2 Replies)
Discussion started by: compan023
2 Replies

5. Shell Programming and Scripting

ssh script for connecting unix system.

Hi All, I've a log file call netbackup.log in all the 5 servers in location usr/netbackup.log. I dont want to login in each server and check the log file. So i wanted to have a script written to have the log information at one place. I want to have the last 2 lines from the file... (2 Replies)
Discussion started by: suri.tyson
2 Replies

6. UNIX for Dummies Questions & Answers

help --translation

I am reading the SANS security policy--.I want to translate the to Chinese.But I don`t understand a paragraph of the. It is :"Where SNMP is used, the community strings must be defined as something other than the standard defaults of "public," "private" and "system" and must be different from... (1 Reply)
Discussion started by: beijingzhzj
1 Replies

7. Shell Programming and Scripting

I need translation!

Someone give me info on this script. I put all the parts I do not understand in BOLD. Please someone explain what the parts in BOLD does/mean. Thanks! #!/bin/bash #Usage: cmdArgs.sh arg1 arg2 arg3 printf "The number of command line args is: $#\n" declare -i counter #Not strictly... (7 Replies)
Discussion started by: 801238429
7 Replies

8. Programming

Swedish Character translation

Sorry if this been posted before. At the moment I'm having problem with the iscntrl() function. I need it to run a check on code entered into a Text Box, however I also need to allow the "Ö, ö" Swedish characters. The iscntrl() function seems to pick up the characters above as part of the... (0 Replies)
Discussion started by: rebelwassie
0 Replies

9. Shell Programming and Scripting

need translation?

Can someone tell me exactly what this code is doing? # # gnutest # # Test launch of ghostscript (gs) from a script # rm gnutest.ps # # ------- calculation that would generate file(s) to # be plotted with gnuplot would be placed here ----------- # gnuplot << \E-o-f2 set... (1 Reply)
Discussion started by: wmosley2
1 Replies
Login or Register to Ask a Question