Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 200577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:07:26+00:00 2026-05-11T17:07:26+00:00

I have some awk scripts that use gawk from cygwin. Now I need to

  • 0

I have some awk scripts that use gawk from cygwin. Now I need to pass these scripts to colleagues that don’t have cygwin installed, but do have Perl. I was hoping I can just use a2p that is included in cygwin, but it fails with errors like the following:

Undefined subroutine &main::gensub called at ./t.pl line 18, <> line 1.

I am hoping there are existing Perl libraries/modules that implement these methods. Any pointers?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T17:07:26+00:00Added an answer on May 11, 2026 at 5:07 pm

    The gensub() function isn’t supported by a2p. If you modify your code to use gsub() instead then it should compile.

    Alternatively, you could add a gensub() subroutine to the end of the translated Perl program to simulate the gensub() functionality.

    However, the Perl code produced by a2p isn’t very maintainable so I’d only use it as a last resort.

    If your gawk program doesn’t make calls to other cygwin/unix utilities then it would probably be better to just distribute a Windows gawk executable to your colleagues along with the program.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

from my ksh I have [[ ` echo $READ_LINE | awk '{print $2}' `
Have some audio and video files that users are to download, however depending on
I come from a computer science. background, but I am now doing genomics. My
I'm using awk to urldecode some text. If I code the string into the
Ive been trying to sort out output using AWK, and have been pretty successful
I have a text file with a large amount of data which is tab
I have the following XML output when I grep for Server: <Server id=1 src=/other/Server/PRX01/PRX01.xml/>
I have local machine (A), testing server (B) and repository server (C). I have
Linux utilities like sed, awk and other shell scripting features are awesome and life
I'm using pdftotext to convert Spanish language text. Characters with accents or tildes are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.