Sponsored Content
Full Discussion: Wildcard in ls
Top Forums Shell Programming and Scripting Wildcard in ls Post 302675255 by alister on Sunday 22nd of July 2012 01:12:51 PM
Old 07-22-2012
Quote:
Originally Posted by Corona688
That's odd that the {} wouldn't be evaluated when used that way, since * definitely is, but it does look like you need eval.
bash performs brace expansion before parameter expansion, so the braces in $VAR aren't special.

However, this would work in ksh, since it performs brace expansion after paremter expansion (just before pathname expansion).

Regards,
Alister
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Find wildcard .shtml files in wildcard directories and removing them- How's it done?

I'm trying to figure out how to build a small shell script that will find old .shtml files in every /tgp/ directory on the server and delete them if they are older than 10 days... The structure of the paths are like this: /home/domains/www.domain2.com/tgp/ /home/domains/www.domain3.com/tgp/... (1 Reply)
Discussion started by: Neko
1 Replies

2. UNIX for Dummies Questions & Answers

wildcard

what will the cmd below do? ls *.3 1 members mentions that to seek all permutations and combinations of the mp3 extension ill have to use curly braces, {} and not, . what then will do? (13 Replies)
Discussion started by: abhi
13 Replies

3. Shell Programming and Scripting

Wildcard comparison

Just a quick question: if I want to do a comparison with a wildcard in a shell script, do i just use '*'? Heres what I have: elif ; then continue but that doesnt evaluate right. It tries to compare against the literal '/apps*' instead of anything that begins with '/apps' (2 Replies)
Discussion started by: rdudejr
2 Replies

4. Shell Programming and Scripting

wildcard

Hi, I have this code to search all "cif" files using wildcard for file in *.cif do grep "Uiso" $file | awk '{ print $3, $4, $5 }' > tet done I get this error "grep: *.cif: No such file or directory" Please where am I going wrong!!! Thank you in advance (6 Replies)
Discussion started by: princessotes
6 Replies

5. UNIX for Advanced & Expert Users

wildcard help

Can someone please explain the wildcards in this. How is this recursive? When I put this in my terminal it recursively displayed everything. ls .* * (6 Replies)
Discussion started by: cokedude
6 Replies

6. Shell Programming and Scripting

How to use wildcard * in if?

Hi, Can anyone help me how to use * in if statement. File contains below line1:a|b|c|Apple-RED| line2:c|d|e|Apple-Green| line3:f|g|h|Orange| I need to find line by line 4th field contains 'Apple' or not. Please help me at the earliest. (6 Replies)
Discussion started by: jam_prasanna
6 Replies

7. Shell Programming and Scripting

wildcard help!!

i have got heaps of files (.pdf, .txt and .doc) files in one folder, i am making a program in PERL that helps me find the files i want easier using shell wildcard, something like this!! print "Enter a pattern: (must be in )"; $input = <STDIN>; if (The input is in and valid wildcard... (3 Replies)
Discussion started by: bshell_1214
3 Replies

8. Shell Programming and Scripting

Using wildcard in if statement

I'm trying to make a small script to see if you say a specific word, in bash. Here is my code so far : if ]; then echo "You typed Something Device Something" fi exit 0 It does not echo what it should, even if i type something along the lines of "random Device stuff" Please help,... (2 Replies)
Discussion started by: DuskFall
2 Replies

9. Shell Programming and Scripting

Wildcard for grep

GNU grep with Oracle Linux 6.3 I want to grep for strings starting with the pattern ora and and having the words r2j in it. It should return the lines highlighted in red below. But , I think I am not using wildcard for multiple characters correctly. $ cat someText.txt ora_pmon_jcpprdvp1... (3 Replies)
Discussion started by: kraljic
3 Replies

10. OS X (Apple)

Help with wildcard

CD_numb is AM017 this code: set the_Firstcom_CD to (do shell script "ls -d '/volumes/audioNAS/Firstcom/Access Music/' ") & CD_numb gives me this: "/volumes/audioNAS/Firstcom/Access Music/AM017" the item I am looking for is AM017Q. I can get the "*" syntax right so it never finder... (7 Replies)
Discussion started by: sbrady
7 Replies
moe(1)																	    moe(1)

NAME
moe - manifest the optimal expansion of a pathname SYNOPSIS
moe [-c] [-32 | -64] [-s | -v] path The moe utility manifests the optimal expansion of a pathname containing reserved runtime linker tokens. These tokens can be used to define dependencies, filtees and runpaths within dynamic objects. The expansion of these tokens at runtime, provides a flexible mechanism for selecting objects and search paths that perform best on this machine. See ld.so.1(1). For example, the token $HWCAP can be employed to represent filters and dependencies. The runtime interpretation of this token can result in a family of objects that are analyzed to determine their applicability for loading with a process. The objects are sorted based on the hardware capabilities that each object requires to execute. moe returns the name of the object optimally suited for execution on the cur- rent platform. moe analyzes a pathname by passing the supplied path to dlmopen(3C), together with the RTLD_FIRST flag. Reserved token expansion is there- fore carried out by ld.so.1 as the expansion would occur in an executing process. Although multiple objects can be analyzed as a result of the dlmopen() call, the RTLD_FIRST flag insures only the optimal object is processed. By default, moe analyzes the specified path twice. The first analysis looks for 32-bit objects. The second analysis, if applicable, looks for 64-bit objects. Typically, 32-bit objects and 64-bit objects are isolated to different directories. These directories are frequently named to reflect the class of object the directory contains. The multiple passes of moe catch any instances where 32-bit objects and 64-bit objects occupy the same directory. Multiple passes also provide flexibility when the pathname that is specified does not convey to the user the class of object the directory might contain. For a complete description of the reserved token expansion carried out by the runtime linker, refer to the . The following options are supported: -32 Only analyze 32-bit objects. -64 Only analyze 64-bit objects. -c Prefix each pathname with the class of the object. -s Silent. No optimal name, or error diagnostics are displayed. Only an error return is made available. This option is only meaning- ful with the -32 and -64 options. The -s option can not be used with the -v option. -v Verbose. If no optimal expansion name can be determined, an error diagnostic is written to standard error. The -v option can not be used with the -s option. The following operand is supported: path The pathname to be expanded. The following example uses moe to display the optimal expansion of objects in the directory /usr/lib/libc. This directory contains a family of Intel objects that are built to use various hardware capabilities. % moe '/usr/lib/libc/$HWCAP' /usr/lib/libc/libc_hwcap.so.1 The -c option can be used to clarify the class of the optimal object. % moe -c '/usr/lib/libc/$HWCAP' 32-bit: /usr/lib/libc/libc_hwcap.so.1 The following example uses moe to display the optimal expansion of objects under the /opt/ISV/cpu directory hierarchy. These directories contain a family of SPARC objects that are built for various platforms. % moe -c -64 '/opt/ISV/$ISALIST/isa.so.1' 64-bit: /opt/ISV/sparcv9/isa.so.1 The -v can be used to diagnose the instance where an optimal name is not returned. An attempt to inspect the previous pathname as a 32-bit object, would result in the following diagnostic being produced. % moe -c -v -32 '/opt/ISV/$ISALIST/isa.so.1' 32-bit: /opt/ISV/sparcv9/isa.so.1: wrong ELF class: ELFCLASS64 When the -32 or -64 options are in effect, a successful optimal expansion returns 0, otherwise non-zero. Without the -32 or -64 options in effect, the return value is always 0. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ ld.so.1(1), optisa(1), isalist(1), dlmopen(3C), attributes(5) 2 Feb 2005 moe(1)
All times are GMT -4. The time now is 12:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy