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

fixed cut command for jck/splitter/splitter.sh #4603

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

yaqsun
Copy link
Contributor

@yaqsun yaqsun commented Jun 2, 2023

The following error occurs when running "echo "$1" | rev | cut -d"/" -f1 -f2 | rev" command

cut: only one type of list may be specified
Try 'cut --help' for more information.

@yaqsun yaqsun requested a review from karianna June 7, 2023 09:57
@yaqsun
Copy link
Contributor Author

yaqsun commented Jun 7, 2023

Excuse me, how to change entries of jck.mk through the splitter.sh script? Run the splitter.sh script(bash splitter.sh /jck/jck8/JCK-compiler-8c/tests/lang/ANNOT 5) separately and manually change the resulting content to jck.mk?

@smlambert
Copy link
Contributor

smlambert commented Jun 7, 2023

FYI @llxia @Mesbah-Alam

@yaqsun - at the moment, the answer to your question is yes. We have recently discussed how we will also automate this step and break out the content for each version into its own makefiles (related: #4455), but we have not yet delivered that enhancement, so for now, it is as you said.

@karianna karianna requested a review from smlambert July 1, 2024 00:55
@sophia-guo
Copy link
Contributor

This might be related with os or cut version? As I didn't get this issue. @yaqsun could you confirm that the PR is still needed?

@yaqsun
Copy link
Contributor Author

yaqsun commented Jul 3, 2024

| rev | cut -d"/" -f1 -f2 | rev

$ cut --version
$ cut (GNU coreutils) 8.30

Run 'echo "JCK-compiler-8c/tests/lang/ANNOT" | rev | cut -d"/" -f1-2 | rev' to output 'lang/ANNOT', run 'echo "JCK-compiler-8c/tests/lang/ANNOT" | rev | cut -d"/" -f1 -f2 | rev' to output 1 error, that is, cut: only one type in the list can be specified. And I looked up some descriptions of cut's -f parameter, which is used as -f1,2 or -f1-2. Maybe I can find some more documentation on cut?

@sophia-guo
Copy link
Contributor

@yaqsun that's fine. Both -f1-2 and -f1 -f2 works on my Mac, but -f1-2 may be more common.

@sophia-guo sophia-guo merged commit dd87740 into adoptium:master Jul 3, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

4 participants