Search Results

Search: Posts Made By: jannusuresh
4,518
Posted By jannusuresh
Thanks ygemici, The following query worked...
Thanks ygemici,

The following query worked fine to me.
sed "s|\(.*IncludeDateTime = \).*|\1$STR1|" file
It changed the existing line in the file from ->

Last update date $$IncludeDateTime =...
4,518
Posted By jannusuresh
Thanks Sarbjit. That is working fine. Now what I...
Thanks Sarbjit. That is working fine. Now what I want is ..

Initial file is like this..
Last update date $$IncludeDateTime = 04/18/2012 11:38:55

After executing the command cat file1 | sed...
4,518
Posted By jannusuresh
Find the text in the file and delete the rest of the line.
Hi,

I have one requiremnet like this. I need to find some particular string (eg.IncludeDateTime = ) in a file. And wherever it finds the string the unix script has to delete the remaining text...
19,884
Posted By jannusuresh
Thanks ygemici(sed_shell@LNU) The following...
Thanks ygemici(sed_shell@LNU)

The following script worked well for me.
sed "s#insert#insert = $STR1#g" filename
resulting as
insert = 04/18/2012 11:38:55

Thanks
Suresh

----------...
19,884
Posted By jannusuresh
Thanks Franklin for the reply. Well, the...
Thanks Franklin for the reply.

Well, the actual command I use in the script is like this..

sed "s/insert/'$STR1'/g" filename
where insert should be replaced with the value of the parameter...
19,884
Posted By jannusuresh
Using sed command replace date variable in unix
I need to use a shell script, using sed command how to replace date variable value in following format.

04/18/2012 11:38:55


Because the sed is treating the '/' as a parameter instead of the...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 10:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy