Need to put a space between wild cards..


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need to put a space between wild cards..
# 1  
Old 05-27-2004
Need to put a space between wild cards..

how do you put a space in a wild card thing..

example

"LastAnalysisT.*${MONTH}.*${DAY}.*20${YEAR}"

I need to make it something like

"LastAnalysisT.*${MONTH}<I need a space here>.*${DAY}.*20${YEAR}"

So it would be something like:

LastAnalyst*May 24*2004

Where * just means I dont care what is there. I just need that space between the month and the day.

How does one put a space in there so it is recognized as a space and not a mistype?
LordJezo
# 2  
Old 05-27-2004
Hi, backslash escape the space... eg
Code:
LastAnalysisT.*${MONTH}\ .*${DAY}.*20${YEAR}"

Cheers
ZB
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh - Checking directory trees containing wild cards

Hi Can somebody please show me how to check from within a KSH script if a directory exists on that same host when parts of the directory tree are unknown? If these wildcard dirs were the only dirs at that level then ... RETCODE=$(ls -l /u01/app/oracle/local/*/* | grep target_dir) ... will... (4 Replies)
Discussion started by: user052009
4 Replies

2. Shell Programming and Scripting

PERL - getting last file using wild cards

Hi experts, I am new to perl. I am trying to get the last file from set of files. Using the below code; but getting error pls help Files: -rw-r--r-- 1 abc abc 12584 Mar 18 16:22 /abc/def/ghi/xyz.HOSTNAME.2016.03.18.16.21.69709-6 -rw-r--r-- 1 abc abc 12623 Mar 18 16:25... (4 Replies)
Discussion started by: sdosanjh
4 Replies

3. UNIX for Dummies Questions & Answers

How to use wild cards to find files beginning with upper and lower case

Im trying to use wild cards to find files that start with either an upper or lower case letter e.g. list files that beginning with b or B, i also want to sort them by the time they were last modified. e.g latest file created first. At the moment i have the following code that ls -d... (3 Replies)
Discussion started by: parker4001
3 Replies

4. Linux

problem of wild cards matching..$ls t[A-Z] output

hi all, i have created a file by name tt and while listing the file ,i used the command $ls t from which i was expecting not to list tt file output coz of uppercase range, But it listed that file tt file and am not able understand the reason. kindly help. NOTE OS :Red Hat Enterprise... (0 Replies)
Discussion started by: rajp_8007
0 Replies

5. UNIX for Dummies Questions & Answers

wild char * in if

if ; then => is it correct? i need to check 10 files size and do the same action. The file name is same but extension of the files are different. how do i deal with it? Please help (1 Reply)
Discussion started by: nidhink
1 Replies

6. Solaris

Consoles gone wild!

I have a Sunfire V890 running solaris 10 that has a weird console problem. In the XWindows environment, everything seems to work fine. However, if I go to command-line mode in multi-user mode or otherwise, my prompt scrolls accross the screen so incontrollably, that the only thing you can do is... (5 Replies)
Discussion started by: josephgreensr
5 Replies

7. Shell Programming and Scripting

renaming with wild chars

Hi, Is it possible to rename with wild charaters as destination name ex I wanna rename xxx_1010_zzz_0.txt to aaa_1010_zzz_1.txt, yyy_1000_ppp_1.txt to bbb_1000_ppp.0.txt I wanna reatin some of the patterns in the filename, rest I wanna rename. like mv... (2 Replies)
Discussion started by: braindrain
2 Replies

8. UNIX for Dummies Questions & Answers

ls and wild card - Should be simple!

I am trying to cp files that have F0 as prefix in their name in path p1/p2 to path p3/p4 this command does not work - Why? (I am using HP/UX) cp p1/p2/F0* p3/p4 thanks. (2 Replies)
Discussion started by: GNMIKE
2 Replies
Login or Register to Ask a Question