473,406 Members | 2,713 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,406 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 3228
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.