i want to create a variable which look like this (with a pipe)
But i tried many cases but it didn't work.
Is it possible ? If yes, can you help me.
What are you planning to do with this variable?
What is the value of the variable YYYY when you try setting log_name?
If you have a variable YYYY that is set to the current year, don't you also need $MM and $DD so they can expand to the current month and day, respectively?
Do you want $YYYY to be expanded when log_name is set, or do you want $log_name to contain the literal string $YYYY?
If you want $YYYY (and any other variables you may define) to be expanded when you set log_name, use:
as shamrock suggested.
Thanks a lot it works with a space.
I' obtain now : Do you know why doesn't it work with the command FIND ?
Of course I know why. And I think you do, too.
Note that the command you used with ll wasl
(with no quotes). So ls was given two operands: server.log and server.log.2013-07-29.[0-9][0-9][0-9].
With find, you added the quotes because a -iname primary takes a single pattern argument; not two. But, by putting quotes around the two patterns, you created a single pattern that will only match filenames that start with server.log server.log.2013-07-29. and end with three decimal digits (and you don't have any files in this directory with names starting with server.log followed by a space).
For this application you need a different approach:
Hi all!
Thanks for taking the time to view this!
I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern.
Example:
Drink a soda
Eat a banana
Eat multiple bananas
Drink an apple juice
Eat an apple
Eat multiple apples
I... (8 Replies)
The sample file:
dept1: user1,user2,user3
dept2: user4,user5,user6
dept3: user7,user8,user9
I want to match by '/^dept2.*/' but don't want to have substring 'dept2:' in output. How to compose such regex? (8 Replies)
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
hello folks,
I have few values in a log which are in scientific notation.
I am trying to convert into actual decimal format or integer but couldn't able to convert.
Values in scientific notation:
1.1662986666666665E-4
2.0946799999999998E-4
3.0741333333333333E-6
5.599999999999999E-7... (2 Replies)
Hello,
I want to simplify two commands into one.
1st command
$type_log_$instance.log.$date.0012nd command
$type_log.log.$date.tar.gzInto blue brackets, How do I do to replace the pattern by a blank or _$instance ?
$type_log?_$instance].log.$date.*Thank you. (13 Replies)
Hello,
I want to verify the format date like 2013-03-08 (YYYY-MM-DD)
It doesn't work because the pattern matching notation below returns false while the date is right.
Can you help me ? Thanks in advance
case "$6" in (-0-0 | -1-1 | -1-2 | -1-3)
# Nothing, OK !
;;
(*) echo 'Fatal,... (4 Replies)
wondering if anyone has any thoughts to convert the below thru a shell script
Convert decimal signalling point notation to ANSI point code notation
There is a site that does that conversion but i need to implement the solution in a shell script.....Thoughts....
OS: Solaris 9
... (4 Replies)
Hi all,
I'm looking for some help. I have a file (very long) that is organized like below:
>Cluster 0
0 283nt, >01_FRYJ6ZM12HMXZS... at +/99%
1 279nt, >01_FRYJ6ZM12HN12A... at +/99%
2 281nt, >01_FRYJ6ZM12HM4TS... at +/99%
3 283nt, >01_FRYJ6ZM12HM946... at +/99%
4 279nt,... (4 Replies)
Hi,
I have file 1.txt with following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433
**
**
**
In file 2.txt I have the following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433... (4 Replies)