The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Perl - converting selected characters to upper/lower case doubleminus UNIX for Dummies Questions & Answers 2 05-19-2008 01:13 AM
Accepting Upper and Lower case lweegp Shell Programming and Scripting 8 12-08-2007 06:57 PM
UNIX command to reverese lower and upper case rfourn Shell Programming and Scripting 6 12-07-2007 10:33 PM
lower case to upper case string conversion in shell script dchalavadi UNIX for Dummies Questions & Answers 3 05-29-2002 12:07 AM
Upper And Lower Case pciatto Shell Programming and Scripting 1 04-29-2002 12:17 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-17-2007
bobk544 bobk544 is offline
Registered User
  
 

Join Date: Jan 2006
Location: fairfax virginia
Posts: 58
copy "cp" command how distinquish upper/lower case

hello,

i thought this should work to specify that i want to "cp" all files no matter what the case, ie upper or lower, as i have 2 files called Makefile and mak

cp -i mak*

but apparently the -i isn't a valid option like it is with grep

thanks for any suggestions!

bobk
  #2 (permalink)  
Old 09-17-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
You need to understand who is doing the expanding. In your case "-i" goes to the command "cp" but "mak*" is expanded directly by the shell.

cp does support the -i option as follows

Code:
     -i    Causes cp to write a prompt to the standard error output before
           copying a file that would overwrite an existing file.  If the
           response from the standard input begins with the character `y', the
           file copy is attempted.
Not quite what you meant.

Try

Code:
cp [mM]ak* tgt
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:39 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0