Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Sep 16th, 2009, 11:52 PM   #1
ergy1983
Newbie
 
Join Date: Sep 2009
Posts: 3
Rep Power: 0 ergy1983 is on a distinguished road
translation of ' in system () or connecting strings

I have a problem with the translation of the following command in awk. In Shell the radiance-command work like that:

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(). My skript looks like this. the importfile runde.txt is just a tabel with seven columns and numbers in it. I wanted to create a surface with different parameters getting out of the runde.txt file and written in the next course file *_adjust.rad:

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)
                                          }
                    }'

The problem is the '-sign, because in awk it is used for '{ and always when I am changing it the befehl-variable it is just printing the command with a replaced $7. Or it is telling me that the gensurf-command is used wrong because it is missing the end of the command...

Does anyone has an idea how to solve it? Maybe connecting strings?

Thanks a lot,
Ergy

Last edited by ergy1983; Sep 17th, 2009 at 12:19 AM.
ergy1983 is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing other system from my system Srinivasa007 Java 2 Dec 19th, 2008 12:46 AM
Trying to pipe output system command results directly into a variable VernonDozier C++ 5 Jan 6th, 2008 2:39 AM
PHP system commands ktsirig PHP 6 Oct 4th, 2005 1:24 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:11 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC