sncr24, your question does not make sense. That's why we cannot answer it.
Those 2 command lines have the same output because the sed command makes no change to the text. The ampersand represents the matched field. Normally, you might do something like this...
Getting back the the original sed command, which already does nothing, you can replace one of the characters in the sed command with an echo statement and that is what you did with
This continues to give the same output as a simple "echo 1 titi" but it watses even more time. Replacing the echo statement with an invocation of date is even more strange, but it can be done because "date" can be forced to behave a little bit like "echo".
echo \&
date +\&
both output a single ampersand. So both
are ways to construct a sed command that will not do anything. But even though we got date to behave a liitle bit like echo, this won't be possible with all of the other unix commands.
I do not know what you are try to do, but I hope this helps move you toward fufilling your requirements. (Whatever they may be...)
Dear all,
I have an user passing 2 parameter 31/03/2015 and 02/04/2015 to a ksh script. How to print the start date to end date.
Expected output is :
31/03/2015
01/04/2015
02/04/2015
Note :
1. Im using aix and ksh
2. I have tried to convert the given input into a date, didnt... (0 Replies)
Hi All,
I need to find all files other than first two files dates & last file date for month and month/year wise list.
lets say there are following files in directory
Mar 19 2012 c.txt
Mar 19 2012 cc.txt
Mar 21 2012 d.txt
Mar 22 2012 f.txt
Mar 24 2012 h.txt
Mar 25 2012 w.txt
Feb 12... (2 Replies)
Hi,
In a field, I should receive the date with time stamp in a particular field. But sometimes the vendor sends just the date or the timestamp or correctl the date×tamp. I have to figure out the the data is a date or time stamp or date×tamp.
If it is date then append "<space>00:00:00"... (1 Reply)
Hi,
I would greatly appreciate it if someone can help me with my problem.
I have a crawler which collects spam URLs everyday & this data needs to be published in a blacklist.
Here's the catch:
The "Time To Live" (TTL) for each URL is 3 months (or whatever for that matter). If i see the... (5 Replies)
Hello everyone,
i wonder if someone could give me an advice regarding the following problem using sed.
Given ist a structure as shown below:
<aaa>text1<b>text2</b>text3<c>text4</c>text5</aaa>
Now I want to change the outer tag from "aaa" to "new" and replace all tags inside the outer tags... (4 Replies)
Hi,
I have list of files as below, with prefix named as date & time. Anyone how to transform each file as below to yyyy-mm-dd hh:mm:ss
Regards, (8 Replies)
Hi,
I am new to using Sed. I have a file containg lines like the following:
INFORM----Test.pc:168:10/11/05 12:34:26 > some text goes here..
TRACE-----Test.pc:197:10/11/05 12:34:26 > some text goes here..
My requirement is to replace 10/11/05 12:34:26 with a string <RUNDATE> (including <... (4 Replies)