Sponsored Content
Top Forums Shell Programming and Scripting How to Select or cut from the certain filed to the end of the line Post 302183856 by grajesh_955 on Thursday 10th of April 2008 03:30:43 AM
Old 04-10-2008
How to Select or cut from the certain filed to the end of the line

Hi:

I have few rows in file..Like suppose...
9063C0 44 00051363603253033253347 3333 070248 06
9063C0 5G PAN00013
9063C0 44 00061030305040404250724 0506 100248 08
9063C0 43 01 00000089

I need to cut the row starting after "9063C0" till the end of the line and store in another file...

My o/P is:
44 00051363603253033253347 3333 070248 06
5G PAN00013
44 00061030305040404250724 0506 100248 08
43 01 00000089
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Select matches between line number and end of file?

Hi Guys/Gals, I have a log file that is updated once every few seconds and I am looking for a way to speed up one of my scripts. Basically what I am trying to do is grep through a text file from start to finish once. Then each subsequent grep starts at the last line of the previous grep to... (4 Replies)
Discussion started by: Jerrad
4 Replies

2. Shell Programming and Scripting

To cut end string from line

HI, I want to cut end string from line. e.g. i have following input line /users/home/test.txt I want to get end string 'test.txt' from above line and length of that end string will change and it always start after '/'. Thanks, Visu (7 Replies)
Discussion started by: visu
7 Replies

3. Shell Programming and Scripting

cut from a particular character to the end of the string

Hi All, I have a string like "9633C01302_2". I need to extract the number(02) after "13" and before "_" and the number coming after "13" and before "_" is not constant, it keeps on changing... Can some one plz help me wth the command.. i tried this echo "9633C01302_2" | cut -d'_' -f1 ..But... (2 Replies)
Discussion started by: grajesh_955
2 Replies

4. Shell Programming and Scripting

cut but include delimiter at end

Can someone please tell me how to do this... input file - /etc/group: wheel:*:0:root,timber daemon:*:1: mysql:*:88: ...etc... giants:*:1001:dalton,bandit dalton:*:1002: bandit:*:1003: output file (my goal): giants:*:1001: dalton:*:1002: bandit:*:1003:I've come up with this: ... (3 Replies)
Discussion started by: Lewcifer
3 Replies

5. Shell Programming and Scripting

delete to end of formatted warnings using sed or cut...

hi, i've searched the forums' entries and have tried some of the examples -- to no avial -- this is my first post -- thanks in advance for your help... As part of an installation program -- i'm receiving two(2) extraneous "libcxb WARNING!" statements -- i want to use sed to eliminate the... (12 Replies)
Discussion started by: rickkar
12 Replies

6. Shell Programming and Scripting

Cut line from file till the end

Hi I have a 57 line text file and I want to cut first 6 line assigned it to a veriable and again cut next 6 line assigned to same variable till the time file have left 0 line. Please let me know how I can do in scripting. Thanks Sanjay (6 Replies)
Discussion started by: Sanjay2121
6 Replies

7. Shell Programming and Scripting

Replace first field of a line with previous filed of the line

Hi Everyone, I have a file as below: IM2345638,sherfvf,usha,30 IM384940374,deiufbd,usha,30 IM323763822,cdejdkdnbds,theju,15 0,dhejdncbfd,us,20 IM398202038,dhekjdkdld,tj,30 0,foifsjd,u2,40 The output i need is as below IM2345638,sherfvf,usha,30... (4 Replies)
Discussion started by: usha rao
4 Replies

8. Shell Programming and Scripting

Cut the strings from end

could you please help me. I have below autosys jobs 01_enable_input_hol_dtpz1b 01_abc_copy_ld_sat_xxxz1 01_abc_mavcd_yyyyyxxxz1 01_abcdef_oa_xxxxxz1 01_fdgte_symbol_ddddz1 01_fsdfsd_clean_mmmhhhfz1 01_fsdfd_create_mut_marchtz1 I want to remove name after last "_" underscore so that... (6 Replies)
Discussion started by: sdosanjh
6 Replies
STF(4)							   BSD Kernel Interfaces Manual 						    STF(4)

NAME
stf -- 6to4 tunnel interface SYNOPSIS
pseudo-device stf DESCRIPTION
The stf interface supports ``6to4'' IPv6 in IPv4 encapsulation. It can tunnel IPv6 traffic over IPv4, as specified in RFC3056. For ordinary nodes in 6to4 site, you do not need stf interface. The stf interface is necessary for site border router (called ``6to4 router'' in the specification). Due to the way 6to4 protocol is specified, stf interface requires certain configuration to work properly. Single (no more than 1) valid 6to4 address needs to be configured to the interface. ``A valid 6to4 address'' is an address which has the following properties. If any of the following properties are not satisfied, stf raises runtime error on packet transmission. Read the specification for more details. o matches 2002:xxyy:zzuu::/48 where xxyy:zzuu is a hexadecimal notation of an IPv4 address for the node. IPv4 address can be taken from any of interfaces your node has. Since the specification forbids the use of IPv4 private address, the address needs to be a global IPv4 address. o Subnet identifier portion (48th to 63rd bit) and interface identifier portion (lower 64 bits) are properly filled to avoid address colli- sions. If you would like the node to behave as a relay router, the prefix length for the IPv6 interface address needs to be 16 so that the node would consider any 6to4 destination as ``on-link''. If you would like to restrict 6to4 peers to be inside certain IPv4 prefix, you may want to configure IPv6 prefix length as ``16 + IPv4 prefix length''. stf interface will check the IPv4 source address on packets, if the IPv6 prefix length is larger than 16. stf can be configured to be ECN friendly. This can be configured by IFF_LINK1. See gif(4) for details. Please note that 6to4 specification is written as ``accept tunnelled packet from everyone'' tunnelling device. By enabling stf device, you are making it much easier for malicious parties to inject fabricated IPv6 packet to your node. Also, malicious party can inject an IPv6 packet with fabricated source address to make your node generate improper tunnelled packet. Administrators must take caution when enabling the interface. To prevent possible attacks, stf interface filters out the following packets. Note that the checks are no way complete: o Packets with IPv4 unspecified addrss as outer IPv4 source/destination (0.0.0.0/8) o Packets with loopback address as outer IPv4 source/destination (127.0.0.0/8) o Packets with IPv4 multicast address as outer IPv4 source/destination (224.0.0.0/4) o Packets with limited broadcast address as outer IPv4 source/destination (255.0.0.0/8) o Packets with subnet broadcast address as outer IPv4 source/destination. The check is made against subnet broadcast addresses for all of the directly connected subnets. o Packets that does not pass ingress filtering. Outer IPv4 source address must meet the IPv4 topology on the routing table. Ingress fil- ter can be turned off by IFF_LINK2 bit. o The same set of rules are appplied against the IPv4 address embedded into inner IPv6 address, if the IPv6 address matches 6to4 prefix. It is recommended to filter/audit incoming IPv4 packet with IP protocol number 41, as necessary. It is also recommended to filter/audit encapsulated IPv6 packets as well. You may also want to run normal ingress filter against inner IPv6 address to avoid spoofing. By setting the IFF_LINK0 flag on the stf interface, it is possible to disable the input path, making the direct attacks from the outside impossible. Note, however, there are other security risks exist. If you wish to use the configuration, you must not advertise your 6to4 address to others. EXAMPLES
Note that 8504:0506 is equal to 133.4.5.6, written in hexadecimals. # ifconfig ne0 inet 133.4.5.6 netmask 0xffffff00 # ifconfig stf0 inet6 2002:8504:0506:0000:a00:5aff:fe38:6f86 prefixlen 16 alias The following configuration accepts packets from IPv4 source 9.1.0.0/16 only. It emits 6to4 packet only for IPv6 destination 2002:0901::/32 (IPv4 destination will match 9.1.0.0/16). # ifconfig ne0 inet 9.1.2.3 netmask 0xffff0000 # ifconfig stf0 inet6 2002:0901:0203:0000:a00:5aff:fe38:6f86 prefixlen 32 alias The following configuration uses the stf interface as an output-only device. You need to have alternative IPv6 connectivity (other than 6to4) to use this configuration. For outbound traffic, you can reach other 6to4 networks efficiently via stf. For inbound traffic, you will not receive any 6to4-tunneled packets (less security drawbacks). Be careful not to advertise your 6to4 prefix to others (2002:8504:0506::/48), and not to use your 6to4 prefix as a source. # ifconfig ne0 inet 133.4.5.6 netmask 0xffffff00 # ifconfig stf0 inet6 2002:8504:0506:0000:a00:5aff:fe38:6f86 prefixlen 16 alias deprecated link0 # route add -inet6 2002:: -prefixlen 16 ::1 # route change -inet6 2002:: -prefixlen 16 ::1 -ifp stf0 SEE ALSO
gif(4), inet(4), inet6(4) http://www.6bone.net/6bone_6to4.html Brian Carpenter and Keith Moore, Connection of IPv6 Domains via IPv4 Clouds, RFC, 3056, February 2001. Jun-ichiro itojun Hagino, Possible abuse against IPv6 transition technologies, draft-itojun-ipv6-transition-abuse-01.txt, July 2000, work in progress. HISTORY
The stf device first appeared in WIDE/KAME IPv6 stack. BUGS
No more than one stf interface is allowed for a node, and no more than one IPv6 interface address is allowed for an stf interface. It is to avoid source address selection conflicts between IPv6 layer and IPv4 layer, and to cope with ingress filtering rule on the other side. This is a feature to make stf work right for all occasions. BSD
April 27, 2001 BSD
All times are GMT -4. The time now is 10:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy