Site Map - skip to main content - dyslexic font - mobile - text - print

Hobby Public Radio

Your ideas, projects, opinions - podcasted.

New episodes Monday through Friday.


hpr2317 :: Bash snippet - extglob and scp

How does scp manage extended glob patterns?

<< First, < Previous, Latest >>

Host Image
Hosted by Dave Morriss on 2017-06-20 is flagged as Explicit and is released under a CC-BY-SA license.
Listen in ogg, spx, or mp3 format. | Comments (2)

Part of the series: Bash Scripting

This is an open series in which Hacker Public Radio Listeners can share their Bash scripting knowledge and experience with the community. General programming topics and Bash commands are explored along with some tutorials for the complete novice.

Bash snippet - extglob and scp

The Problem

Following on from my last show on filename expansion, concentrating on extended patterns and the extglob option, I was asked a question by Jon Kulp in the comment section.

Jon was using ls *(*.mp3|*.ogg) to find all OGG and MP3 files in a directory which also held other files. However, when he wanted to copy this subset of files elsewhere he had problems using this expression in an scp command.

Having done some investigations to help solve this I thought I'd put what I found into an HPR episode and share it, and this is the show.

Along the way clacke commented too and this led me to more investigations!

Long notes

As often happens, my idea of a brief episode turned into something much longer, so I converted the notes into long notes which you can find here. In them I have marked some sections which you might want to skip over -- unless you are as much of a geek as I am! I have not covered these sections in detail in the audio.


Comments

Subscribe to the comments RSS feed.

Comment #1 posted on 2017-06-28T20:13:31Z by Jonathan Kulp

Clarity!

Well, sort of. Many thanks for this follow-up episode, Dave. I think I understand it better now but I might not. Just one of those things, you know?

Comment #2 posted on 2017-06-29T13:20:16Z by Dave Morriss

Clear as mud? :-)

Hi Jon,

I hope it helped, if only a little. I got quite carried away by the investigation, and perhaps shouldn't have brain-dumped it all into an episode! It was quite fun though.

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to
record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Title:
Comment:
Anti Spam Question: What does the P in HPR stand for ?
Are you a spammer →
Who hosted this show →
What does HPR mean to you ?