[clug] Ever received a .dat file from an <other OS> user?
Peter Barker
pbarker at barker.dropbear.id.au
Fri Jan 15 04:26:41 MST 2010
On Fri, 15 Jan 2010, Adam Baxter wrote:
> What do the \ ?_? wildcards do?
\ is escaping the following space. The question marks stand for any
single character. So the pattern "part\ ?_?.dat" will match:
"part 1_1.dat"
"part a_b.dat"
See "Pattern Matching" in "man bash".
While we're on shell scripting.... a question of my own.
I vaguely recall a safe way of doing this:
rm -rf $dir_i_do_not_want/$subdir_i_do_not_want.
This is... somewhat unsafe, particularly when run by root. I *think* I
recall a shell trick to turn this into a safe operation, so you *don't* do
something unfortunate to your system should those variables be empty. Any
takers?
Yours,
--
Peter Barker | Programmer,Sysadmin,Geek.
pbarker at barker.dropbear.id.au | You need a bigger hammer.
:: It's a hack! Expect underscores! - Nigel Williams
More information about the linux
mailing list