mbpssgms
asked on
awk script continued...
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
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)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
(mv /tmp/FLXDOCK; awk 'BEGIN{printf "Enter residue and chain information:";getline var < "-";split(var,a)}(NR==35){
and got
./../../SCRIPTS/SETFLEX2
../../../SCRIPTS/SETFLEX2:
../../../SCRIPTS/SETFLEX2:
ASKER
To fix used other script
ASKER
(mv /tmp/FLXDOCK; awk 'BEGIN{printf "Enter residue and chain information:";getline var < "-";split(var,a)}(NR==35){
and my erroris
../../../SCRIPTS/TEST: line 1: unexpected EOF while looking for matching `''
../../../SCRIPTS/TEST: line 3: syntax error: unexpected end of file
gav