473,394 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Shell wild card characters

41
Hi,
Does anyone know how i could use wild chars like so:
echo "-->This is ${MY_HOME}/config/log/test{*}.pid";

The file will start like so with
test123.pid
test12421.pid
testrqwrqwr.pid
test435ytft.pid
Does anyone know how i could achive this ????
Jul 5 '07 #1
3 3227
arne
315 Expert 100+
Hi,
Does anyone know how i could use wild chars like so:
echo "-->This is ${MY_HOME}/config/log/test{*}.pid";

The file will start like so with
test123.pid
test12421.pid
testrqwrqwr.pid
test435ytft.pid
Does anyone know how i could achive this ????
What about something like
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/sh
  2.  
  3. list=`ls test*.c`
  4. echo $list
  5.  
HTH,
arne
Jul 5 '07 #2
What about something like
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/sh
  2.  
  3. list=`ls test*.c`
  4. echo $list
  5.  
HTH,
arne
--------------------------------------------------------------
Hi arne,

I have 1 more Idea

you can do 1 more thing
Expand|Select|Wrap|Line Numbers
  1. for each_file in `ls test*.c`
  2. do
  3.         echo $each_file
  4. done
  5.  
Jul 6 '07 #3
Motoma
3,237 Expert 2GB
echo "-->This is $HOME/config/log/test{*}.pid" && ls $HOME/config/log/test*.pid
Jul 6 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Gerry Viator | last post by:
Hi all, I want to remove the test after a period? Why does the wild card * not work? Dim test As String = "This is just a test report. ERCP" MessageBox.Show(Replace(test, ".*", "."))
1
by: Steve T | last post by:
I have just contracted with a firm that is using a front-end web interface to access our sales data. They developed it with Microsoft Dotnet, and it uses Microsoft SQL as the database. When I...
2
by: Paweł | last post by:
Hello! I'm looking for efficient code or site where I can find code for finding one string in another string. String which I search should have "wild" characters like '?' for any one char and...
1
by: Tempy | last post by:
Could somebody please tell me if it is possible and if how? I am wanting to do : Iif(="*PE","Y","N") In other word i want it to fine HZPE, AEPE, HEPE etc... Les Stout *** Sent via Devdex...
12
by: Jerry Camel | last post by:
Not sure if this is a good place to post this... I'm writing and ASP.net app using vb .net. I need to interact with a credit card reader. I have one that sits inline with the keyboard. Works...
1
by: =?Utf-8?B?S3Jpc3RpbmUgdGhlIERyYWdvbkxhZHk=?= | last post by:
Can anyone advise re spam emails which come through with the word V***gra (where the * are varying letters) - how do I specify the word just as I've typed the word with the asterisks? I can't find...
0
by: shamaila | last post by:
wild card characters are used to match strings as select * from table where name LIKE '%brown%'; but doesnt supports matching of dates,number what will we do if we want approximate matching of...
3
Looking2Learn
by: Looking2Learn | last post by:
Hey, I'm trying to open a txt file, but I won't know the first three characters of the filename. For example, I want to open a "user.txt" file, and I know it will have three digits in front of it,...
7
by: W. eWatson | last post by:
Is it possible to do a search for a wild card string in another string. For example, I'd like to find "v*.dat" in a string called bingo. v must be matched against only the first character in bingo,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.