- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- AWK Programming in Linux
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2003 08:27 PM
тАО07-28-2003 08:27 PM
Re: AWK Programming in Linux
binLinux/GenMill $Mill G68 $G68 "$Sign"
# printf 'G00 G90 G58 X0. Y0.\nG58 G68 X0 Y0 R%c[%0.3g]\n' "$Sign" "$G68"
These three lines are truely interseting.. The 'printf' might have been causing your error, but given the way these 3 lines are at the moment, I'd have expected something else, like a Syntax error.
This is obviously shell script, and you've not said which shell you're using. I'll assume bash or ksh for the moment.
The single [] around $G68 are using the external 'test' application, and assuming $G68 is numerical, should be fine. If it wasn't, you'd be getting "integer expression expected" errors on STDERR.
With the command on the next line after && however, this portion of the routine appears that it would never return the error you are describing.
You've siad you've run it with 'set -xv', then you should have seen exactally where it's falling over.
If you could paste us the output you get when using 'set -x' for when it calls this function, we might be able to help further.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2003 07:38 PM
тАО07-29-2003 07:38 PM
Re: AWK Programming in Linux
gawk ...
WriteOps
fi >> ${Mill}_$Func.nc
ReadOpLine $((OpN+1)) $Stat
And this is the output with set -vx
+ WriteOps
SquD: bin/Milling[129]:0.00:unexpected '.'
SquD: bin/Milling[129]:0.00:unexpected '.'
+ ReadOpLine 2 1
The 129th line of Milling is the last line of code in the file and simply states 'fi'
Thanks for all your help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2003 07:38 PM
тАО07-29-2003 07:38 PM
Re: AWK Programming in Linux
WriteOps
fi >> ${Mill}_$Func.nc
ReadOpLine $((OpN+1)) $Stat
And this is the output with set -vx
+ WriteOps
SquD: bin/Milling[129]:0.00:unexpected '.'
SquD: bin/Milling[129]:0.00:unexpected '.'
+ ReadOpLine 2 1
The 129th line of Milling is the last line of code in the file and simply states 'fi'
Thanks for all your help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2003 07:56 PM
тАО07-29-2003 07:56 PM
Re: AWK Programming in Linux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2003 08:09 AM
тАО07-31-2003 08:09 AM
Re: AWK Programming in Linux
Sorry about that. I am attaching the full code of the routine that is giving the problem. I hope you the error that was coming which I had posted above. If you need any further input, I would be more than willing to give. IT is taking a lot of our time to transfer this script from HP-UX to Linux.
Thanks in advance.
Sam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2003 04:55 PM
тАО07-31-2003 04:55 PM
Re: AWK Programming in Linux
Modify the first line (#!/bin/ksh) to have a -x on the end of it, tne walk though to make sure each line gets the sorts of values you expect.
- « Previous
-
- 1
- 2
- Next »