Sponsored Content
Top Forums Shell Programming and Scripting trobule with sed command. Plz help? Post 302165770 by vinna on Friday 8th of February 2008 06:50:07 PM
Old 02-08-2008
trobule with sed command. Plz help?

I trying to replace a value with some other value in a file using sed command. Both the replacing and replacable values may contain special charcters (example old value="c:\\tmp" and new value="/tmp")

Below is the code i am using.
sed s/FCR.BASEIN_BACKUP=c:\\temp/FCR.BASEIN_BACKUP=/tmp/g /opt/test.properties > /opt/test.properties

the following is the error i am facing.
sed: command garbled: s/FCR.BASEIN_BACKUP=c:\\temp/FCR.BASEIN_BACKUP=/tmp/g /opt/test.properties

The file in which i am trying to replace (/opt/test.properties) is getting emptied (filesize 0) when i run the above command

Your help is greatly appreciated.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

plz Help How should I configure cc compiler output file plz help???

i.e configuration of C compiler :confused: (4 Replies)
Discussion started by: atiato
4 Replies

2. UNIX for Dummies Questions & Answers

find command - Urgent Plz.

Hi, In my current directory, i have the following files: x1.dat x2.dat.gz x3.dat I want to use the find command and display only files which has *.dat and NOT *.gz extension files. Please help me out. Thanks, Kris Kart. (2 Replies)
Discussion started by: Kris_Kart_101
2 Replies

3. UNIX for Dummies Questions & Answers

Plz Help : How to use write command to execute command on some other terminal

Hi Group , I m trying to execute commands on some other system using write command but inspite of executing the commands they r passed as simple messages. - i m writing >write user-id ! ls o ctrl-d inspite of executing the command ls,other terminal shows ! ls. Thnx in advance. (2 Replies)
Discussion started by: Aashish
2 Replies

4. UNIX for Dummies Questions & Answers

explain command plz

echo -n "1. Updating Password Policy in OID..." | tee -a $logfile set ldap_v1 = `ldapsearch -b "" -h $oid_host -p $oid_port -D "cn=orcladmin" -w $admin_pwd -s sub "cn=PwdPolicyEntry" dn | head -1` echo "dn:$ldap_v1" > ldap1.out echo "changetype:modify" >> ldap1.out echo... (2 Replies)
Discussion started by: maoro
2 Replies

5. UNIX for Dummies Questions & Answers

Basic unix command help plz

I was wondering what command lines i could use to do the following. 1. mail a file to a user with a subject line "HELLO". Also, send a Blind carbon copy to a different user? 2. Display the number of files AND directories in a given directory? 3. Display the last 5 files in a given... (4 Replies)
Discussion started by: tragic54
4 Replies

6. UNIX for Advanced & Expert Users

help plz with sed

I am thanks, (2 Replies)
Discussion started by: pochaman
2 Replies

7. Shell Programming and Scripting

Loop with sed command to replace line with sed command in it

Okay, title is kind of confusion, but basically, I have a lot of scripts on a server that I need to replace a ps command, however, the new ps command I'm trying to replace the current one with pipes to sed at one point. So now I am attempting to create another script that replaces that line. ... (1 Reply)
Discussion started by: cbo0485
1 Replies

8. Shell Programming and Scripting

help understanding 'exec' command plz

plz someone explain me what does -exec ls -Fd do? :confused::confused::confused::confused::confused::confused: Thanks in advance !! (3 Replies)
Discussion started by: sears
3 Replies

9. UNIX for Dummies Questions & Answers

Need help with SED command plz

I need two solutions 1) How can i swap the first and last character in each line of file temp 2) How can i display content of the file using sed command Please help (2 Replies)
Discussion started by: champu
2 Replies

10. Shell Programming and Scripting

sed and awk giving error ./sample.sh: line 13: sed: command not found

Hi, I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :- ./sample.sh: line... (12 Replies)
Discussion started by: satishmallidi
12 Replies
sconadm(1M)						  System Administration Commands					       sconadm(1M)

NAME
sconadm - register system information SYNOPSIS
/usr/sbin/sconadm register -a [-e softwareUpdate | -E softwareUpdate] [-h hostname] [-l logfile] [-N] [-p proxy_host[:proxy_port]] [-r registration_profile] [-u username] [-x proxy_username] /usr/sbin/sconadm proxy [-l logfile] [-p proxy_host[:proxy_port]] [-r registration_profile] [-x proxy_username] DESCRIPTION
The sconadm utility is a command-line version of the Basic Registration GUI. In the first form of the command in the SYNOPSIS, sconadm uses the register subcommand to register a host with a registration server. In the second form, sconadm uses the proxy subcommand to configure all of the components for software update to use an HTTP web proxy. The parameters specified with -u, -e (or -E), -h, -p, and -x override values specified in your registration profile. A template for this profile, owned by root, with read-only permissions, is stored in /usr/lib/breg/data/RegistrationProfile.properties. See registration_pro- file(4). For the proxy subcommand, the proxy password is stored in the RegistrationProfile.properties file, available if proxy authentication is needed. Storage in the profile prevents proxy passwords from being exposed as part of a listing of processes on a system. OPTIONS
The following options are supported: -a Accept "Terms of Use and Binary Code License". Absence of this option means that you do not accept the license. -e softwareUpdate Enable client to be managed at the Sun-hosted Update Connection Service. -E softwareUpdate Disable client's ability to be managed at the Sun-hosted Update Connection Service. -h hostname Hostname of the machine you want to register. -l logfile Pathname of log file. -N Never register. -p proxy_host[:proxy_port] Proxy host name and optional proxy port number. -r registration_profile Pathname to a registration profile. -u username User name (a Sun Online Account). -x proxy_username User name on the proxy host. EXAMPLES
Unless specified otherwise, the commands below require root privileges or privileges equivalent to root. See privileges(5). Example 1 Registering a New System Assume a file registrationprofile.properties in /tmp that contains the following: userName=user123 password=abc123 hostName= subscriptionKey= portalEnabled=false proxyHostName= proxyPort= proxyUserName= proxyPassword= To register a new system using the profile above, you enter: /usr/sbin/sconadm register -a -r /tmp/registrationprofile.properties Example 2 Reregistering a System with a Different User Assume a file registrationprofile.properties in /tmp with the contents shown below. Note the changed specification for userName and pass- word. userName=newuser password=newpassword hostName= subscriptionKey= portalEnabled=false proxyHostName= proxyPort= proxyUserName= proxyPassword= To reregister a new system using the profile above, you enter the same command you entered to register the system: /usr/sbin/sconadm register -a -r /tmp/registrationprofile.properties Example 3 Reregistering a System, Adding a Sun Subscription Key Modify registrationprofile.properties as follows: userName=newuser password=newpassword hostName= subscriptionKey=abc12345678 portalEnabled=false proxyHostName= proxyPort= proxyUserName= proxyPassword= Run the command: /usr/sbin/sconadm register -a -r /tmp/registrationprofile.properties Example 4 Reregistering and Enabling Access to all Update Connection Services Modify registrationprofile.properties as follows: userName=newuser password=newpassword hostName= subscriptionKey=abc12345678 portalEnabled=false proxyHostName= proxyPort= proxyUserName= proxyPassword= Note that portalEnabled is set to false. Run the command: /usr/sbin/sconadm register -a -r /tmp/registrationprofile.properties -e softwareUpdate Example 5 Never Registering To never register a system, enter: /usr/sbin/sconadm register -N Example 6 Using a Proxy Server With Proxy Authentication Edit registrationprofile.properties as follows: userName= password= hostName= subscriptionKey= portalEnabled= proxyHostName=webcache.mycompany.com proxyPort=8080 proxyUserName=myCompanyProxyUserName proxyPassword=myCompanyProxyPassword Run the command: /usr/sbin/sconadm proxy -r /tmp/registrationprofile.properties Example 7 Changing Proxy Host Settings Edit registrationprofile.properties as follows: userName= password= hostName= subscriptionKey= portalEnabled= proxyHostName=webcache.mycompany.com proxyPort=8080 proxyUserName=myCompanyProxyUserName proxyPassword=myCompanyProxyPassword Run the command: /usr/sbin/sconadm proxy -r /tmp/registrationprofile.properties Then, change the proxyHostName value by running the following command: /usr/sbin/sconadm proxy -r /tmp/registrationprofile.properties -p newproxy.mycompany.com After the preceding command all proxies use newproxy.mycompany.com. Example 8 Resetting a System Not to Use a Proxy Edit registrationprofile.properties as follows: userName= password= hostName= subscriptionKey= portalEnabled= proxyHostName= proxyPort= proxyUserName= proxyPassword= Note that values for all proxy fields are null. Run the command: /usr/sbin/sconadm proxy -r /tmp/registrationprofile.properties EXIT STATUS
0 Success. >0 An error occurred. FILES
/usr/lib/breg/data/RegistrationProfile.properties Registration profile template. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWbrg | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ SEE ALSO
registration_profile(4), attributes(5), privileges(5) SunOS 5.11 27 Feb 2006 sconadm(1M)
All times are GMT -4. The time now is 06:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy