Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

awk: warning: escape sequence error when running zoau dls command #23

Open
gngrossi opened this issue Apr 11, 2024 · 11 comments
Open

awk: warning: escape sequence error when running zoau dls command #23

gngrossi opened this issue Apr 11, 2024 · 11 comments

Comments

@gngrossi
Copy link

Using zoau 1.3.1.0

without zopen tools

[@02858@SYSA]$ dls -l "hlq.*"
@02858.BBCDEF PO FB 80 TSO103
@02858.BBIJRNLL PS F 0 TSO100
@02858.BBPROF PO FB 80 TSO101
@02858.BBSDEF PO FB 80 TSO005
@02858.BBVDEF PO FB 80 TSO104
@02858.BBVISPF.ISPPROF PO FB 80 TSO028

with zopen tools

bash-5.2$ which awk
/hewitt/zopentools/zopen_repo/usr/local/bin/awk

bash-5.2$ dls -l "hlq."
awk: warning: escape sequence \.' treated as plain .'
BGYSC1103E No datasets match pattern: @02858.
.

@IgorTodorovskiIBM
Copy link
Collaborator

It's coming from dlsrawhelper:
awk - =ITODORO\..* // { if ($2 ~ "^"regexpattern"$") { print $1 " " $2 " " $3 }; }

The . above should be double escape \\. See https://stackoverflow.com/questions/67111174/attempting-to-pass-an-escape-char-to-awk-as-a-variable . I think /bin/awk just doesn't complain about it.

FYI @AnthonyGiorgio

@gngrossi
Copy link
Author

Any additional documentation needed?
Is it feasible for this port to not use an awk link or during the install, ask if a link should be used?
thanks

@IgorTodorovskiIBM
Copy link
Collaborator

Interesting, brew has this caveat:

GNU "awk" has been installed as "gawk".
If you need to use it as "awk", you can add a "gnubin" directory
to your PATH from your ~/.bashrc and/or ~/.zshrc like:

     PATH="$HOMEBREW_PREFIX/opt/gawk/libexec/gnubin:$PATH"

We could do something similar

@AnthonyGiorgio
Copy link

Could we also do gmake for GNU make?

@gngrossi
Copy link
Author

gngrossi commented May 2, 2024

If I remove the link, we can use awk and gawk independently.
Thoughts?

bash-5.2$ which awk
/hewitt/zopentools/zopen_repo/usr/local/bin/awk

bash-5.2$ cd /hewitt/zopentools/zopen_repo/usr/local/bin/
lrwxrwxrwx 1 @02858 @ISCICS1 4 Jan 4 17:07 awk -> gawk

@AnthonyGiorgio
Copy link

I'm in favor, as it means that I won't have to immediately change ZOAU to work with gawk.

@IgorTodorovskiIBM
Copy link
Collaborator

Some of the tool builds rely on the gawk version of awk. I'm ok to delete it from bin/, but I'd also like provide the symlink'd awk in another directory like gnubin for example.

We can probably do the same for gmake and potentially any other tools that collide with the native /bin tools.

I'll add this as a topic for the next dev meeting

@AnthonyGiorgio
Copy link

That would be a good compromise.

@gngrossi
Copy link
Author

gngrossi commented May 4, 2024

For now, removing the link.
Should this issue be closed?
thanks

@gngrossi
Copy link
Author

Installed the upgrade and removed the two awk links.

@gngrossi
Copy link
Author

Installed the upgrade and removed the gawk link from /hewitt/zopentools/zopen_repo/usr/local/altbin
Hopefully it can be used with ZOAU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants