LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > LinuxQuestions.org > LinuxQuestions.org Member Intro
User Name
Password
LinuxQuestions.org Member Intro New to LinuxQuestions.org? Been a long time member but never made a post? Introduce yourself here.

Notices


Reply
  Search this Thread
Old 09-17-2020, 09:21 AM   #1
LSnodgrass
LQ Newbie
 
Registered: Sep 2016
Location: Arizona
Distribution: RedHat
Posts: 1

Rep: Reputation: Disabled
Hello from Arizona


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."
 
Old 09-19-2020, 03:44 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Welcome to LQ, LSnodgrass!
 
Old 09-19-2020, 05:46 PM   #3
greencedar
Senior Member
 
Registered: Sep 2018
Distribution: Linux Mint 19.1 Tessa & 19.3 Tricia
Posts: 1,314
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
Welcome to the forum. Looking forward to your participation.
 
Old 09-20-2020, 03:53 AM   #4
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,726

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Greetings, LSnodgrass, and welcome to LQ!
 
Old 09-20-2020, 08:30 PM   #5
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,005
Blog Entries: 26

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
Welcome to a fellow Arizonan!!
 
Old 09-20-2020, 09:48 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,342
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
Quote:
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!
 
Old 09-21-2020, 12:28 PM   #7
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,142
Blog Entries: 21

Rep: Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480
Quote:
A quote I really like:

If it ain’t broke do fix it!


Howdy and Welcome.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hello from Arizona Crueltiming LinuxQuestions.org Member Intro 4 06-09-2013 09:11 PM
Hello from Arizona DisMan LinuxQuestions.org Member Intro 2 05-29-2008 09:07 PM
Hello from an avid Linux and BSD user in Phoenix, Arizona sutherland.ryan LinuxQuestions.org Member Intro 1 12-14-2006 11:55 PM
Hello from the Arizona desert! pbpersson LinuxQuestions.org Member Intro 2 02-04-2005 01:49 AM
Yavapai, Arizona - LUGY eddacker Linux User Groups (LUG) 1 05-14-2004 10:43 AM

LinuxQuestions.org > Forums > LinuxQuestions.org > LinuxQuestions.org Member Intro

All times are GMT -5. The time now is 03:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration