Sponsored Content
Full Discussion: ls exclude pattern
Top Forums Shell Programming and Scripting ls exclude pattern Post 302285195 by cfajohnson on Saturday 7th of February 2009 06:25:54 PM
Old 02-07-2009
Quote:
Originally Posted by JCR
With ls *.html I am getting all the files ending with html; what would be the best why to get all the files not ending with html?

In ksh, or bash with extended globbing turned on:
Code:
printf "%s\n" *!(.html)

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep - to exclude lines beginning with pattern

11132 13069 11137 11142 13070 Can I use grep command to exclude all lines beginning with 13? I dont want to use grep -v 13 as potentially there will be a number with something like 11013 that I would exclude in error.. (2 Replies)
Discussion started by: frustrated1
2 Replies

2. UNIX for Dummies Questions & Answers

exclude columns with a matching line pattern

Hi , I have 5 columns total and am wanting to search lines in columns 3-5 and basically grep -v patterns that match 'BBB_0123' 'BVG_0895' 'BSD_0987' Does anyone know how to do this? I tried combining grep -v with grep -e but, it didn't work. Thanks! (5 Replies)
Discussion started by: greptastic
5 Replies

3. Shell Programming and Scripting

search a pattern and if pattern found insert new pattern at the begining

I am trying to do some thing like this .. In a file , if pattern found insert new pattern at the begining of the line containing the pattern. example: in a file I have this. gtrow0unit1/gctunit_crrownorth_stage5_outnet_feedthru_pin if i find feedthru_pin want to insert !! at the... (7 Replies)
Discussion started by: pitagi
7 Replies

4. Shell Programming and Scripting

Regular Expression to exclude pattern

Hi All I am using regular expressions to determine how to group certain data. I've included an example of the data below. USD_SPTR_2Y_725.5_PUT_EUROPEAN_09Q1|USD||European| CAD_NDX_10Yx1Y_5.5_PUT_EUROPEAN_09Q1|CAD||European| The regular expressions I am using is as follows and this is... (5 Replies)
Discussion started by: kingpin2502
5 Replies

5. Programming

Using sql like to choose a pattern and exclude a pattern

Hi, I am writing an sql query in which i have to choose only that url that are from particular host but are not zip files. something like: select * from mytable where url like '%myhost%' and url not like '%zip%' Is there a simple way to combine these two condition into one? (3 Replies)
Discussion started by: vickylife
3 Replies

6. Ubuntu

[Solved] Using Find with an exclude/exclude file

I am familiar with using tar and exclude/include files: tar zcf backup.dirs.tgz --files-from=include.mydirs --exclude-from=exclude.mydirs --no-recursion but was wondering if I could use find in the same way. I know that you can just specify the directories to exclude but my list is... (2 Replies)
Discussion started by: metallica1973
2 Replies

7. UNIX for Dummies Questions & Answers

Match Pattern after certain pattern and Print words next to Pattern

Hi experts , im new to Unix,AWK ,and im just not able to get this right. I need to match for some patterns if it matches I need to print the next few words to it.. I have only three such conditions to match… But I need to print only those words that comes after satisfying the first condition..... (2 Replies)
Discussion started by: 100bees
2 Replies

8. Shell Programming and Scripting

Global Pattern - exclude directories

All, I am trying delete folder by adding pattern not to delete certain folders. But i struck with error. When i use below command from command line, it works fine. shopt -s extglob rm -rf !(test1|test2|test3) But when i use the same in shell script, i get the below error. syntax... (6 Replies)
Discussion started by: vino_hymi
6 Replies

9. Shell Programming and Scripting

sed and awk usage to grep a pattern 1 and with reference to this grep a pattern 2 and pattern 3

Hi , I have a file where i have modifed certain things compared to original file . The difference of the original file and modified file is as follows. # diff mir_lex.c.modified mir_lex.c.orig 3209c3209 < if(yy_current_buffer -> yy_is_our_buffer == 0) { --- >... (5 Replies)
Discussion started by: breezevinay
5 Replies

10. Shell Programming and Scripting

sed -- Find pattern -- print remainder -- plus lines up to pattern -- Minus pattern

The intended result should be : PDF converters 'empty line' gpdftext and pdftotext?xml version="1.0"?> xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies
AMPLE(1)							    User Manual 							  AMPLE(1)

NAME
ample - Ample MP3 server SYNOPSIS
ample [OPTION] [PATH...] DESCRIPTION
ample Ample is an MP3 server that allows you to listen to your music that can be stored locally or remotely. It does not intend to support mixing, radio shows etc. It's just an easy way to listen to your MP3's everywhere using the "open location" features already present in XMMS, WinAmp and Media Player. After installing, configuring and starting ample, try connecting to http://server:1234/ with the "open location" feature of your favourite MP3 player or http://server:1234/index.html with your favourite web browser. OPTIONS
-p NUM --port=NUM Listen to TCP port NUM, default is 1234. -o --order When a list of files is requested, play them in alphabetical order. -c NUM --clients=NUM Allow a maximum of NUM clients to be connected at the same time. -n --norecursive Don't automatically index files in subdirs of the directories being indexed -f FILE --conffile=FILE Use FILE as config file instead of the default /etc/ample/ample.conf. See ample.conf(5) for details. -m FILE --htmlfile=FILE Use FILE as HTML template instead of the default /etc/ample/ample.html. See ample.html(5) for details. -h --help Display help message and exit. -d [NUM] --debug[=NUM] Print debug messages, a higher value of NUM means more detail. -t --trace Disables forking and backgrounding, useful for debugging. -v --version Display version information and exit. -i --pidfile [PIDFILE] Write a PIDFILE to handle ample as a daemon [PATH...] These are path(s) to files or directories that Ample can use to populate it's list of MP3's. If PATH is a directory, all files (pos- sibly recursively, see the -n option above) will be added. If PATH is a regular file ending with .mp3 it will be added and if it is a regular file ending with .m3u (MP3 playlist) the files listed in it will be added. FILES
/etc/ample/ample.conf The default config file (another file may be used, see the -f option above). See ample.conf(5) for further details. /etc/ample/ample.html The default HTML template file (another file may be used, see the -m option above). See ample.html(5) for further details. BUGS
Of course totally bugfree or your money back :-) AUTHOR
David Hardeman <david@2gen.com> SEE ALSO
ample.conf(5), ample.html(5) Ample JANUARY 2002 AMPLE(1)
All times are GMT -4. The time now is 07:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy