LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 12-07-2012, 11:54 AM   #1
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 450

Rep: Reputation: 31
Question How do I make this work: ls -1 ".cf_db/${basename}*.srt" 2>/dev/null


How do I make this string work:

ls -1 ".cf_db/${basename}*.srt" 2>/dev/null

The ${basename} can contain spaces and special characters but as soon as you put it in quotes the wildcard no longer works.
 
Old 12-07-2012, 11:57 AM   #2
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 450

Original Poster
Rep: Reputation: 31
Never fails as soon as I post the question in a forum I find my own answer shortly after:

ls -1 .cf_db/"${basename}"*.srt 2>/dev/null
 
Old 12-07-2012, 12:12 PM   #3
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 4,197

Rep: Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642
find mite be better.

Last edited by schneidz; 12-07-2012 at 12:26 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"bash: /dev/null: Permission denied" on Ubuntu Login... sancho Ubuntu 10 10-08-2009 12:38 AM
exec("binary > /dev/null &") sodek Linux - Newbie 7 06-22-2009 07:04 PM
What is meant by " file > /dev/null 2>&1 </dev/null " attockonian Linux - Newbie 5 06-30-2006 11:51 PM
Platform-independent "/dev/null" stream redirection? wapcaplet Programming 1 08-12-2005 11:11 PM
'Can a user be created with username as "/dev/null" in an application?' sheetal_govekar Linux - Software 1 08-25-2004 12:31 PM


All times are GMT -5. The time now is 10:57 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration