LinuxQuestions.org Member IntroNew to LinuxQuestions.org? Been a long time member but never made a post? Introduce yourself here.
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.
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.
Very interested in Embedded Linux, config management, regular expressions, command line 'pipeline' puzzles and solutions.
Puzzles like this:
# For each text file in this directory,
# replace the row (line) in the file beginning with <path//>
# with "<path//>" and the fully qualified pathname
# something like
# <path//> /c/Users/john.smith/Documents/glossary.txt
#
# And better yet, perform a regex on the 'realpath' value, changing it into a
# Windows path like this:
# <path//> C:/Users/john.smith/Documents/glossary.txt
#
for filename in $(find . -type f -depth 1 -iname '*.txt' | xargs realpath)
do
sed -i.bak -n -e '/<path\/\/>/ {s/<path\/\/>.*$/<path\/\/> ${filename}/ }' ${filename}
echo Done ${filename}
done
# Again, this is just an introduction, not a legitimate post for assistance.
# And no, the bash + sed script above doesn't work yet.
# It's "the kind of" problems I am interested in solving from the command line
# as opposed to other solutions like writing a custom C, C++, C#, Python, Perl, PowerShell
# script.
#
A quote I really like:
"The best way to learn something is to try explaining it to the computer."
A quote I really like:
"The best way to learn something is to try explaining it to the computer."
I can't attest to that, but, as an old classroom instructor, I can say that I probably learned more about [subject] by teaching it 20 times than my trainees learned by hearing it once!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.