Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

awk script continued...

Posted on 2009-04-16
4
Medium Priority
?
225 Views
Last Modified: 2013-11-13
Hi, this script updates 2 lines of a file.  But both the file and script must be in the cwd.  How must it be so the user may be in another dir.  The script and file  are in the same dir.
thanks

(mv /tmp/FLXDOCK; awk 'BEGIN{printf "Enter residue and chain information:";getline var < "-";split(var,a)}(NR==35){$7=a[1];}(NR==25){$5=a[1];}{print /home/gav/DOCKING/AUTODOCK/SCRIPTS >"FLXDOCK"}' /tmp/FLXDOCK)

Open in new window

0
Comment
Question by:mbpssgms
  • 3
4 Comments
 
LVL 85

Accepted Solution

by:
ozo earned 750 total points
ID: 24155779
print /home/gav/DOCKING/AUTODOCK/SCRIPTS >"/tmp/FLXDOCK"
0
 

Author Comment

by:mbpssgms
ID: 24155904
I wasn't sure what to add where so the script looks like this
(mv /tmp/FLXDOCK; awk 'BEGIN{printf "Enter residue and chain information:";getline var < "-";split(var,a)}(NR==35){$7=a[1];}(NR==25){$5=a[1];}print /home/gav/DOCKING/AUTODOCK/SCRIPTS >"/tmp/FLXDOCK

and my erroris
../../../SCRIPTS/TEST: line 1: unexpected EOF while looking for matching `''
../../../SCRIPTS/TEST: line 3: syntax error: unexpected end of file
gav
0
 

Author Comment

by:mbpssgms
ID: 24156424
Also tried
(mv /tmp/FLXDOCK; awk 'BEGIN{printf "Enter residue and chain information:";getline var < "-";split(var,a)}(NR==35){$7=a[1];}(NR==25){$5=a[1];} print /home/gav/DOCKING/AUTODOCK/SCRIPTS >"/tmp/FLXDOCK"
and got
./../../SCRIPTS/SETFLEX2
../../../SCRIPTS/SETFLEX2: line 1: unexpected EOF while looking for matching `''
../../../SCRIPTS/SETFLEX2: line 2: syntax error: unexpected end of file
0
 

Author Closing Comment

by:mbpssgms
ID: 31570887
To fix used other script
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
No other job is as rewarding and demanding as building an iPhone app is. It is not really in the hands of the developer for the success of an iPhone app. Many factors operate jointly for every iOS application's success in the market.
Simple Linear Regression
Introduction to Processes

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question