grep string between strings
echo "beforestring-THIS IS THE STRING I WANT-afterstring" | \
grep -o -P '(?<=beforestring-).*(?=-afterstring)'
echo "beforestring-THIS IS THE STRING I WANT-afterstring" | \
grep -o -P '(?<=beforestring-).*(?=-afterstring)'
In this example we want to archive a huge number of .xml files in the current directory:
# find . -name "*.xml" -print > ./file.lst # tar czvf ./archive.tgz --files-from ./file.lst
And delete all archived files:
# xargs -a ./file.lst rm -v # rm ./file.lst
# openssl pkcs12 -in xxx_v1_apns_production.p12 -out xxx_v1_apns_production.pem -nodes -clcerts
# cd /root/of/wp/installation # find . -type d -exec chmod 0755 {} \; # find . -type f -exec chmod 0644 {} \; (yeah living on the edge, always as root)
In order to get the PHP function setlocale() to work in Slackware you need some libraries installed:
glibc
glibc-i18n
I’m using Slackware 14.1 (64bit), sooo:
# wget ftp://ftp.slackware.no/slackware/slackware64-14.1/patches/packages/glibc-i18n-2.17-x86_64-11_slack14.1.txz # wget ftp://ftp.slackware.no/slackware/slackware64-14.1/patches/packages/glibc-2.17-x86_64-11_slack14.1.txz # installpkg glibc-2.17-x86_64-11_slack14.1.txz # installpkg glibc-i18n-2.17-x86_64-11_slack14.1.txz