03-14-2002
Whatever solution you choose - for ease of use (as was highlighted in Perderabo's reply) instead of all those //\\/\/\/\/\\\//\/\/\/\///\\\/// slahses going on...you can just use '=' as a separator for the sed fields...i.e.
sed s=/first/dir/file=second/dir/file=g
Much easier to follow....and it's not restricted to '=' ..there are others like # you can use as well........
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have one File named "txt_file"
# cat txt_file
<DBType>RT</DBType>
<AppType>RT</AppType>
--------------------------------------------------
I want replace "<AppType>RT</AppType>" to
<AppType>XY</AppType> in txt_file and output redirect to Newfile
... (2 Replies)
Discussion started by: SanjayLinux
2 Replies
2. Shell Programming and Scripting
I always kind of wondered this but I have a variable that I want to use in a search and replace. Basically I want to search a file for the string in my variable and replace it with something fixed but I'm unsure of the variable rule in sed. Here's generally what I have:
sed 's/$name/newname/g'... (15 Replies)
Discussion started by: eltinator
15 Replies
3. Shell Programming and Scripting
I know that I want to entirely replace line 3 in my file filename.txt. I have tried all sorts of variations of
sed 3,3,c\replacement stuff\ filename.txt with no success.
about the only thing that causes any reaction is
sed 3,3c\\ filename.txt
but it just prints out the whole file.
... (13 Replies)
Discussion started by: SusanDAC
13 Replies
4. Shell Programming and Scripting
Hi,
Could anyone clearly explain me the below sed construct in detail to get to know what it actually does?
sed 's/\(* *\)//4'
echo 'test;10;20' | sed 's/*;\(*\)/\1/' (1 Reply)
Discussion started by: royalibrahim
1 Replies
5. Shell Programming and Scripting
Thanks to this forum I have managed to work out a solution to my problem and actually understand most of it, but one thing is confusing me and I am sure someone here can explain.
I need to insert a piece of txt into a file. This txt is
awk '{ sub(/$/,"\r"); print }' $JCL_WBB50103_EFTOUT >... (2 Replies)
Discussion started by: hukcjv
2 Replies
6. UNIX for Dummies Questions & Answers
Hello,
here is what I've got :
FILE='/OPERATIONNEL/SATURNE/CHAMPS/MASTER/ANA/SATURNE_1DAV_20080805_20080806_S3D_T_R20080806.NC ';;... (4 Replies)
Discussion started by: Aswex
4 Replies
7. Shell Programming and Scripting
<tr><td width=10% style='width:5%;background:#F7F0D9;padding:0in 0in 0in 0in 0in'><center><b>Package</b></td><td width=10% valign=center style='width:5%;background:#F7F0D9;padding:0in 0in 0in 0in 0in'><center><b>JTs</b></td>
This is got to be simple. I run this on the above .html file:
sed... (8 Replies)
Discussion started by: dba_frog
8 Replies
8. Shell Programming and Scripting
Hi,
In the following excerpt of shell script code: I could not understand the sed syntax. Could anyone shed some light on this?
configure_ssl()
{
jboss_conf_file=$1
echo "Configuring SSL for -" ${jboss_conf_file}
isSSLSetup=`echo cat ${jboss_conf_file} | grep <Connector... (2 Replies)
Discussion started by: royalibrahim
2 Replies
9. Shell Programming and Scripting
Greetings!
Have a quick question for the community today; this time looking at a nifty little sed puzzle ;)
Consider the following file content to be worked through:What needs to happen is theblock should be removed up to and including the following blank line, leavingI have bits and pieces... (8 Replies)
Discussion started by: LinQ
8 Replies
10. UNIX for Dummies Questions & Answers
Dear all,
I need help, again.
I would like to use a sed on a for. Is is possible to ask sed to call a file in the syntax?
For exemple:
sed "/Y/ s/number/X/" test_imput > test_output
where Y is a file which inside there is one pattern only; Also X is a file with one... (6 Replies)
Discussion started by: lColli
6 Replies
LEARN ABOUT OSX
mac::aete::app
Mac::AETE::App(3) User Contributed Perl Documentation Mac::AETE::App(3)
NAME
Mac::AETE::App - reads the Macintosh Apple event dictionary from an application.
SYNOPSIS
use Mac::AETE::App;
use Mac::AETE::Format::Dictionary;
$app = App->new("My Application");
$formatter = Dictionary->new;
$app->set_format($formatter);
$app->read;
$app->write;
DESCRIPTION
The App module simplifies reading the Apple event dictionary from an application. It will launch the application if necessary to obtain
the dictionary.
Methods
new Example: ($name is the name of the application.)
use Mac::AETE::App;
use Mac::AETE::Format::Dictionary;
$app = App->new($aete_handle, $name);
read (Inherited from Mac::AETE::Parser.)
Reads the data contained in the AETE resource or handle. Example:
$app->read;
set_format
(Inherited from Mac::AETE::Parser.)
Sets the output formatter used during by the 'write' subroutine. Example:
$formatter = Dictionary->new;
$app->set_format($formatter);
copy (Inherited from Mac::AETE::Parser.)
Copies all suites from one Parser object into another. Example:
$aete2 = Parser->new($aete_handle2, $another_name);
$app->copy($aete2);
copies the suites from $aete2 into $aete.
merge (Inherited from Mac::AETE::Parser.)
Merges suites from one Parser object into another. Only the suites that exist in both objects will be replaced. Example:
$aete3 = Parser->new($aete_handle2, $another_name);
$app->merge($aete3);
write (Inherited from Mac::AETE::Parser.)
Prints the contents of the AETE or AEUT resource using the current formatter.
$app->write;
INHERITANCE
Inherits from Mac::AETE::Parser.
AUTHOR
David Schooley <dcschooley@mediaone.net>
perl v5.10.0 2005-05-16 Mac::AETE::App(3)