Wildcards In UNIX | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Wildcards In UNIX

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-13-2002
smdakram smdakram is offline
Registered User
 
Join Date: Jan 2002
Last Activity: 8 May 2004, 1:18 AM EDT
Location: INDIA
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Data Wildcards In UNIX

on my SCO UNIX wild cards are not displaying wanted result.
Why like that . I think that i was not using proper command .

what are there . how can i use the wildcards in UNIX.
Sponsored Links
    #2  
Old 01-13-2002
peter.herlihy peter.herlihy is offline
Registered User
 
Join Date: Nov 2001
Last Activity: 1 August 2006, 11:51 AM EDT
Location: New Zealand
Posts: 333
Thanks: 0
Thanked 0 Times in 0 Posts
To answer your question you'll need to tell us what you are trying to do...in what situation or with which command are you trying to use wildcards.

i.e are you trying to list files, or is it in a script...etc.

Please provide more info...
Sponsored Links
    #3  
Old 01-14-2002
smdakram smdakram is offline
Registered User
 
Join Date: Jan 2002
Last Activity: 8 May 2004, 1:18 AM EDT
Location: INDIA
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
ls s*

when i try to search files which first character start's with S char.

I giving worng outout why like that.

how to use wildcards in SCOUNIX.
    #4  
Old 01-14-2002
kanang kanang is offline
Registered User
 
Join Date: Dec 2001
Last Activity: 25 April 2004, 2:26 PM EDT
Location: kuala lumpur
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Re: ls s*

the syntax "ls s*" looks alright, and i think it is recognised by all shells across unix families. the unexpected output may be due to the existence of subdirectory whose name begins with an "s" also. for example, in the current directory i have files: sfile1, sfile2 and sdir1 (sdir1 is a subdirectory contains sfile3 and xfile4. when i issue "ls s*" the output will be:

sfile1 sfile2

sdir1:
sfile3 xfile4

this is just my humble guess.
Sponsored Links
    #5  
Old 01-14-2002
shaik786
Guest
 
Posts: n/a
Check your CAPS (Case Sensitivity), Also, as kanang said, that could be another problem, so you could use:
Code:
ls -d S*

instead.
Sponsored Links
    #6  
Old 01-14-2002
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 24 November 2014, 10:48 PM EST
Location: Ashburn, Virginia
Posts: 9,930
Thanks: 64
Thanked 438 Times in 261 Posts
Wildcarding is sometimes also called globbing. And shells have ways to turn it off. We need to know which shell you are using to tell you how to check and correct this. But with ksh there is an option called "noglob" and you want this option off. I find the syntax for this to be counterintuitive:

set -o | grep noglob # check status of noglob
set -o noglob # Turn noglob on, no wildcards
set +o noglob # Turn noglob off, wildcards work
Sponsored Links
    #7  
Old 04-04-2002
Long John Slive Long John Slive is offline
Registered User
 
Join Date: Apr 2002
Last Activity: 4 April 2002, 1:52 PM EST
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Data More on wildcards - help?

Greetings Peeps

I'm sure there was a wildcard syntax, being as *nix tends to be case-sensitive when matching filenames, that enabled the following to be matched

*.mp3 *.MP3 *.Mp3 and *.mP3

using a single, 'wildcard' pattern-match something like:

ls *.[Mm][Pp]3

... obviously this doesn't work (else I wouldn't be posing the question) - where is my syntax wrong?

LJS
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Using Wildcards in scp phpsnook Shell Programming and Scripting 0 10-10-2011 04:43 AM
Wildcards cokedude UNIX for Advanced & Expert Users 1 10-24-2010 05:07 AM
SED and wildcards Xterra UNIX for Dummies Questions & Answers 10 09-11-2010 05:26 PM
ls with wildcards benu302000 UNIX for Dummies Questions & Answers 10 06-29-2005 02:53 PM
wildcards benu302000 UNIX for Dummies Questions & Answers 3 06-29-2005 01:10 PM



All times are GMT -4. The time now is 05:57 PM.