Slackware This Forum is for the discussion of Slackware Linux.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
07-02-2023, 04:00 PM
#1
Member
Registered: Apr 2018
Distribution: Slackware 15.0/Current
Posts: 461
gen_repo_files.sh grep errors
Quote:
cat gen_repos_files44.sh | grep grep
if [ "$(echo $PKG|grep -E '(.*{1,})\-(.*[\.\-].*[\.\-].*).t[blxg]z[ ]{0,}$')" == "" ];
if [ "$(echo $PKG|grep -E '(.*{1,})\-(.*[\.\-].*[\.\-].*).t[blxg]z[ ]{0,}$')" == "" ];
cat .PACKAGES.TXT | grep -v "PACKAGE MIRROR: " >> PACKAGES.TXT
find -L . -type f -print $PRUNES | grep -v CHECKSUMS | sort | xargs md5sum $1 2>/dev/null >> .CHECKSUMS.md5
find . -type f -print $PRUNES | grep -v CHECKSUMS | sort | xargs md5sum $1 2>/dev/null >> .CHECKSUMS.md5
GPG_FPR=$($GPGBIN --with-colon --with-fingerprint --list-keys "$REPOSOWNERGPG" |grep ^fpr |head -1 |cut -d: -f10)
if ! grep -q $GPG_FPR ${REPOSROOT}/GPG-KEY ; then
if ! grep -q $GPG_FPR ${REPOSROOT}}/${SUBDIR}/GPG-KEY ; then
packages will not be signed!
Continue? [y|N] y
grep: warning: stray \ before -
grep: warning: stray \ before -
grep: warning: stray \ before -
This is what is happening with grep 3.11 on Slackware-Current and using the gen_repo_files.sh script that Eric has made available.
07-03-2023, 01:14 AM
#2
Member
Registered: Aug 2021
Distribution: Arch Linux, Debian, Slackware
Posts: 594
Rep:
Hm, it works here on -current:
Code:
$ cat gen_repos_files.sh |grep grep
if [ "$(echo $PKG|grep -E '(.*{1,})\-(.*[\.\-].*[\.\-].*).t[blxg]z[ ]{0,}$')" == "" ];
if [ "$(echo $PKG|grep -E '(.*{1,})\-(.*[\.\-].*[\.\-].*).t[blxg]z[ ]{0,}$')" == "" ];
cat .PACKAGES.TXT | grep -v "PACKAGE MIRROR: " >> PACKAGES.TXT
find -L . -type f -print $PRUNES | grep -v CHECKSUMS | sort | xargs md5sum $1 2>/dev/null >> .CHECKSUMS.md5
find . -type f -print $PRUNES | grep -v CHECKSUMS | sort | xargs md5sum $1 2>/dev/null >> .CHECKSUMS.md5
GPG_FPR=$($GPGBIN --with-colon --with-fingerprint --list-keys "$REPOSOWNERGPG" |grep ^fpr |head -1 |cut -d: -f10)
if ! grep -q $GPG_FPR ${REPOSROOT}/GPG-KEY ; then
if ! grep -q $GPG_FPR ${REPOSROOT}}/${SUBDIR}/GPG-KEY ; then
I have 'grep-3.11-x86_64-1' package installed.
Your script is called 'gen_repos_files
44 .sh' so I assume you've made changes? I would check those.
07-03-2023, 04:04 AM
#3
Member
Registered: Apr 2018
Distribution: Slackware 15.0/Current
Posts: 461
Original Poster
K i will check thank u
07-03-2023, 09:59 AM
#4
Member
Registered: Apr 2018
Distribution: Slackware 15.0/Current
Posts: 461
Original Poster
Which version of the script do u by chance use??
07-03-2023, 10:19 AM
#5
LQ Guru
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,118
the latest version of the script is
this .
note that the message
Code:
grep: warning: stray \ before -
like it says is just a warning and it shows because the new grep warns about non-necessary escape chars.
so you can just safely ignore it.
if you just can't stand it modify the gen_repos_files.sh script like this
Code:
--- ./gen_repos_files.sh.orig 2020-12-30 13:09:39.000000000 +0100
+++ ./gen_repos_files.sh 2023-07-03 17:08:23.369179747 +0200
@@ -281,7 +281,7 @@
PKG=$1
PACKAGESFILE=$2
- if [ "$(echo $PKG|grep -E '(.*{1,})\-(.*[\.\-].*[\.\-].*).t[blxg]z[ ]{0,}$')" == "" ];
+ if [ "$(echo $PKG|grep -E '(.*{1,})-(.*[\.-].*[\.-].*).t[blxg]z[ ]{0,}$')" == "" ];
then
return;
fi
@@ -371,7 +371,7 @@
PKG=$1
MANIFESTFILE=$2
- if [ "$(echo $PKG|grep -E '(.*{1,})\-(.*[\.\-].*[\.\-].*).t[blxg]z[ ]{0,}$')" == "" ];
+ if [ "$(echo $PKG|grep -E '(.*{1,})-(.*[\.-].*[\.-].*).t[blxg]z[ ]{0,}$')" == "" ];
then
return;
fi
1 members found this post helpful.
07-03-2023, 10:28 AM
#6
Member
Registered: Apr 2018
Distribution: Slackware 15.0/Current
Posts: 461
Original Poster
thank you so much @ponce I will add that patch to my gen_repo_files script.
Update: it worked now I have alot of gen_repo_files scripts to update. Thank you again @ponce.
Last edited by reddog83; 07-03-2023 at 10:32 AM .
All times are GMT -5. The time now is 07:43 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News