Sponsored Content
Top Forums UNIX for Dummies Questions & Answers find and replace command in one line using one command Post 80813 by vasikaran on Friday 12th of August 2005 04:34:56 AM
Old 08-12-2005
find and replace command in one line using one command

Hi,

I have a entry in the file as

::BSNL GUJARAT::India::OUT::NAT::REWEL::POSTPAID::919426199995

if u see this, i have the delimiter as :: ,

all i want is to replace "::" as ":"

so how to do that..

pls help

thanks
 

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

find and replace command

Hi, i used to do on soalris box but in linux box i am not able to do advice is appreciated uname -a Linux intranet 2.4.20-pre3 #1 Tue May 6 17:55:35 IST 2008 i686 unknown $ find /usr/local/ -type f | xargs perl -pi -e 's/172.16.1.14/172.16.1.27/g' Can't remove /usr/local/bin/dbhome:... (1 Reply)
Discussion started by: prakash.gr
1 Replies

3. Shell Programming and Scripting

What is find and replace command in unix?

hello forum memvers, 1:I have to write a script for find a string and replace with another string. 2:In shell script how to replace one string with another string.:b: (4 Replies)
Discussion started by: rajkumar_g
4 Replies

4. Shell Programming and Scripting

sed command to find and replace

Hello All, I need a sed command to find and replace below text in multiple files in a directory. Original Text :- "$SCRIPT_PATH/files" Replace with :- "$RESOURCE_FILE" Thank you in advance !!! Regards, Anand Shah (1 Reply)
Discussion started by: anand.shah
1 Replies

5. Shell Programming and Scripting

sed find and replace command not working

Hi, Am trying to replace a character '-' with 'O' in position 289 in my file but am not success with below command. sed 's/^\(.\{289\}\)-/\1O/' filename sed: 0602-404 Function s/^\(.\{289\}\)-/\1O/ cannot be parsed. Thanks in Advance Sara Video tutorial on how to use code tags in The... (9 Replies)
Discussion started by: Sara183
9 Replies

6. Shell Programming and Scripting

sed command to skip the first line during find and replace operation

Hi Gurus, I did an exhaustive search for finding the script using "sed" to exclude the first line of file during find and replace. The first line in my file is the header names. Thanks for your help.. (4 Replies)
Discussion started by: ks_reddy
4 Replies

7. Shell Programming and Scripting

Find and replace using sed command

The content of the file filea.txt is as follows. --------- case $HOSTNAME in aaa) DS_PARM_VALUE_SET=vsDev APT_Configuration_File=/appl/infoserver/Server/Configurations/2node.apt ;; bbb) DS_PARM_VALUE_SET=vsQA... (3 Replies)
Discussion started by: kmanivan82
3 Replies

8. Shell Programming and Scripting

sed command to replace a line at a specific line number with some other line

my requirement is, consider a file output cat output blah sdjfhjkd jsdfhjksdh sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf hellow there this doesnt look good et cetc etc etcetera i want to replace a line of line number 4 ("this doesnt look good") with some other line ... (3 Replies)
Discussion started by: vivek d r
3 Replies

9. Shell Programming and Scripting

sed command to replace a line in a file using line number from the output of a pipe.

Sed command to replace a line in a file using line number from the output of a pipe. Is it possible to replace a whole line piped from someother command into a file at paritcular line... here is some basic execution flow.. the line number is 412 lineNo=412 Now i have a line... (1 Reply)
Discussion started by: vivek d r
1 Replies

10. UNIX for Beginners Questions & Answers

Find command + replace the extension (.xxx) by *

Hello, I'm on HP Unix and in a Job, I tried to extract all files from a folder, and replace the extension (.xxxx) by '*' , remove duplicates and move the result in a file.. Example : Folder has : ABC, CCC.txt, CCC.sf, CCC.sfd, DDD I need to generate and output file with : ... (6 Replies)
Discussion started by: royinfo.alain
6 Replies
ipnat(1M)                                                                                                                                ipnat(1M)

NAME
ipnat - user interface to the NAT subsystem SYNOPSIS
ipnat [-dlhnrsvCF] -f filename The ipnat utility opens a specified file (treating - as stdin) and parses it for a set of rules that are to be added or removed from the IP NAT. If there are no parsing problems, each rule processed by ipnat is added to the kernel's internal lists. Rules are appended to the internal lists, matching the order in which they appear when given to ipnat. ipnat's use is restricted through access to /dev/ipauth, /dev/ipl, and /dev/ipstate. The default permissions of these files require ipnat to be run as root for all operations. ipnat's use is restricted through access to /dev/ipnat. The default permissions of /dev/ipnat require ipnat to be run as root for all oper- ations. The following options are supported: -C Delete all entries in the current NAT rule listing (NAT rules). -F Delete all active entries in the current NAT translation table (currently active NAT mappings). -d Turn debug mode on. Causes a hex dump of filter rules to be generated as it processes each one. -f filename Parse specified file for rules to be added or removed from the IP NAT. filename can be stdin. -h Print number of hits for each MAP/Redirect filter. -l Show the list of current NAT table entry mappings. -n Prevents ipf from doing anything, such as making ioctl calls, which might alter the currently running kernel. -s Retrieve and display NAT statistics. -r Remove matching NAT rules rather than add them to the internal lists. -v Turn verbose mode on. Displays information relating to rule processing and active rules/table entries. /dev/ipnat Link to IP Filter pseudo device. /dev/kmem Special file that provides access to virtual address space. /etc/ipf/ipnat.conf Location of ipnat startup configuration file. /usr/share/ipfilter/examples/ Contains numerous IP Filter examples. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWipfu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ ipf(1M), ipfstat(1M), ipnat(4), attributes(5) To view license terms, attribution, and copyright for IP Filter, the default path is /usr/lib/ipf/IPFILTER.LICENCE. If the Solaris operat- ing environment has been installed anywhere other than the default, modify the given path to access the file at the installed location. 25 Jul 2005 ipnat(1M)
All times are GMT -4. The time now is 11:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy