Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FT: Syntax Error

Status
Not open for further replies.

KBAJay

Technical User
Oct 22, 2007
3
DE
I need some Help. I'm from Germany and my boss gave me a weird exercise. The script below don't really word and I have to fix it. But how? I get a FT: Syntax Error.

sh awk-test.p
+ awk {if ($7 ~ /KAN/) { x = substr($7, 11, 27); print x;} else continue} pr.hoeft
+ ft -t -k sotest1:1100!04A9470F42C300.121007114747 04D3470F45DB00.121007120059 04E4470F464000.121007120240 04F7470F476800.121007120903 FT.KAU.%UNIQUE NHDRWSMb
ft: Syntaxfehler im Kommando.

Who can help or do you need further informations?
 
Hi

Sorry, personally I do not understand what you wrote there. Is there a shell script which execute two [tt]awk[/tt] one-liners ? And I have no clue what is with those plus signs ( + ).

Please clarify abit what is there and whet are you doing with that.

And please post your code between [tt][ignore]
Code:
[/ignore][/tt] .. [tt][ignore]
[/ignore][/tt] tags.

Feherke.
 
I'm guessing you also have a script (or function inside awk-test.p) called [tt]ft[/tt] which is invoked from this (cryptic) code.

So, please provide the contents of awk-test.p - not just part of it's output or error-output...
And if you know where it's at, show the ft script also.


HTH,

p5wizard
 
Ok, I try to explain a little bit more.

Here the code:

Code:
set -x
ft -t -k sotest1:1100!`awk '{if ($7 ~ /KAN/) { x = substr($7, 11, 27); print x;} else continue}
'pr.hoeft-jan` FT.KAU.%UNIQUE NHDRWSMb
#awk '{if ($7 ~ /KAN/)
#     { x = substr($7, 11, 27); y = substr($7, 1, 3);
#      print "ft -t -k sotest1:1100!"x" FT.KAU.%UNIQUE NHDRWSMb" | exec;
#      print "X: ", x, "Y: ", y}
#     else continue} ' pr.hoeft

pr.hoeft-jan: this is a list
sotest: this is our test server

I really don't know what my boss wants. It is a script for file transfer used with Solaris 9 (our operating system) with our customers. And there must be an Syntax Error. Anyway I get an exception who tells me that.
 
You're right p5wizard.

I got two scripts: awk-test.p and awk-openft.p

awk-test.p:

Code:
set -x
ft -t -k sotest1:1100!`awk '{if ($7 ~ /KAN/) { x = substr($7, 11, 27); print x;} else continue}
' pr.hoeft` FT.KAU.%UNIQUE NHDRWSMb
#awk '{if ($7 ~ /KAN/)
#     { x = substr($7, 11, 27); y = substr($7, 1, 3);
#      print "ft -t -k sotest1:1100!"x" FT.KAU.%UNIQUE NHDRWSMb" | exec;
#      print "X: ", x, "Y: ", y}
#     else continue} ' pr.hoeft

awk-openft.p:

Code:
awk '{if ($7 ~ /KAN/)
     { x = substr($7, 11, 27); y = substr($7, 1, 3);
      print "X: ", x, "Y: ", y}
     else continue} ' pr.hoeft

This is all I got.
 
If [tt]ft[/tt] complains about a syntax error, then there must also be a program named [tt]ft[/tt].

Try either of these:
[tt]type tt
which tt[/tt]

These may tell you where the [tt]ft[/tt] program is, then show the script's contents (if it is a script... it might also be a binary executable).

Try this to find out what kind of program [tt]ft[/tt] is:
[tt]file (pathname in output of type tt or which tt)[/tt]

If it is a binary executable, you may need to dig up the documentation that came with it...


HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top