File modification help: without manual editing through vi :
Hi Experts,
I want to edit a file from a selected pattern range, please advise how to accomplish from command line, without going vi and doing it manually:
portion of the file given below: (red want to remove and save )
1. I know the interface number is lan5:5 , that need to match first.
2. I want to get the pattern for this , i.e the instance number for the line containing lan5:5 is is [8] in this case.
3. I want to remove all the entries for instance number : [8]
The output in the file should be like this after deleting the patterns:
Hi
I am accessing a file on nfs mounted device, after completing using of the file, i am tring to restore the access time and modification times of the file.
So i got the previous modified time of the file using stat() function and trying to set the date and time for the file, To set these... (6 Replies)
Can anyone please suggest an alternate command for "stat" . I am trying this on Solaris 5.9 , but the command doesn't exist.
Basically i need to see one particalar file modification history. Any help is appreciated. (4 Replies)
Dear all,
I 'd like to create a new txt file using the old file. For example, in old file, if count=2 then in new file, repeat that row twice, with the only difference is: on the first row, 'start' column contains the 1st apart of the 'start' in the old file; while in the 2nd row, the 'start'... (7 Replies)
Hi,
I have a file test.txt . The contain of the file is as below :
365798~SAPUS~PR5~0000799005~ADM CHARG MEDCAL INS~~~~~~~~~~~~~~~~~~~~~~~~SLAC480
I want to modify this file. And file contain loking like
"365798"~"SAPUS"~"PR5"~"0000799005"~"ADM CHARG MEDCAL... (6 Replies)
Hi,
I have a file abcd.txt.
cat abcd.txt
output is as follows :
"aa"~"bb"~"001"~""~""~"cc"
"dd"~"005"~""
~""~"kk"~"aa"~"00
8"~""~""~
I want the output looking like:
cat abcd.txt
"aa"~"bb"~"001"~""~""~
"cc""dd"~"005"~""~""~
"kk"~"aa"~"008"~""~""~
I have a script. (4 Replies)
Hi All,
I have a file disk_space.log.
cat disk_space.log
94% /
32% /boot
38% /mnt/data
100% /media/CDROM
I want the output, like
cat disk_space.log
94% /
100% /media/CDROM
That means print the line those are grater-than 90%. And rest of the line is remove from file.
I have a... (2 Replies)
Hi All, I have a file. This file contain huge amount of data. I want to modify this file. I want enter new line when count of "~ character is 79. Please find below the code : cat file_name | tr -d '\n' | sed... (6 Replies)
Hi, I have a file input.txt. cat input.txt output is as follows : Code: "0001"~"name"~"bb"~"20.25"~""~""~"0002"~"name" "dd"~"35.50"~"" ~""~"0003"~"name"~"aa"~"21.3 5"~""~""~ I want the output looking like: cat output.txt Code: "0001"~"name"~"bb"~"20.25"~""~""~... (6 Replies)
Hi,
I have a file. File contains are as follows :
Feb 19, 2012 5:05:00 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Feb 19, 2012 5:05:00 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 771 ms
Feb 20, 2012... (3 Replies)
Discussion started by: mnmonu
3 Replies
LEARN ABOUT OSF1
iptunnel
iptunnel(8) System Manager's Manual iptunnel(8)NAME
iptunnel - Creates, deletes, and displays configured tunnels
SYNOPSIS
/usr/sbin/iptunnel [operation] [args]
DESCRIPTION
The iptunnel command creates configured tunnels for sending and receiving IPV6 or IPV4 packets that are encapsulated as the payload of an
IPV4 datagram.
The iptunnel command can perform one of the following operations: Creates a tunnel interface, which you must subsequently configure by
using the ifconfig command. The syntax of the create operation is as follows:
iptunnel create [-I int-name] [v4-dest] [v4-src]
Specifies the interface unit of the tunnel to be created. This is an optional parameter. The int-name parameter has the following
form: iptx, where x is the interface unit number. By default, the interface name selected for the tunnel is iptx+1, or the value of
the interface unit number of the last tunnel created plus 1. Specifies the remote end-point to which a tunnel is to be created.
Sets the IPV4 source address in the encapsulating header. The tunnel is enabled (packets are sent/received on the tunnel) only if
v4-src is a valid address on the system. This is an optional parameter. Deletes a tunnel interface. You must disable the tunnel
before you can delete it by executing the following command: # ifconfig tunnel name down delete abort Shows the tunnel attributes
(name, tunnel end points, next hop for tunneled packets).
EXAMPLES
To create a tunnel from hobbes to calvin, enter: # iptunnel create -I ipt5 calvin ipt5 iftype 208 src 16.140.16.86 dst 16.140.16.91
To display the tunnel attributes, enter: # iptunnel show ipt5 interface ipt5 src 16.140.16.86 dst 16.140.16.91 gate 16.140.16.86 To config-
uring the tunnel to encapsulate IPv6 packets, enter: # ifconfig ipt5 ipv6 up
IPv6 packets will be sent as payloads of IPv4 datagrams from 16.140.16.86 to 16.140.16.91.
The tunnel may also be used to send IPV4 packets encapsulated within IPV4 headers as follows: # ifconfig ipt5 10.10.80.60 netmask
255.255.255.0
To verify the previous command, enter: # ifconfig ipt5 ipt5: flags=4c1<UP,RUNNING,NOARP,MULTICAST>
16.140.16.86 --> 16.140.16.91
rxmt 1000, reach time 30000, dad tries 1, mtu 1280, hops 64, token len 64
inet 10.10.80.60 netmask ffffff00 ipmtu 1280
inet6 fe80::108c:1056 To deleting the tunnel, enter: # ifconfig ipt5 down delete abort ipt5: delete inet address 10.10.80.60
10.10.80.60: aborting 0 tcp connection(s)
Then, enter: # iptunnel delete ipt5 interface ipt5 deleted
SEE ALSO
Commands: ifconfig(8).
RFC 2003, IP Encapsulation within IP, Perkins, C., October 1996
iptunnel(8)