Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tcpmux 1/tcp # TCP port service multiplexer
- tcpmux 1/udp # TCP port service multiplexer
- rje 5/tcp # Remote Job Entry
- rje 5/udp # Remote Job Entry
- echo 7/tcp
- echo 7/udp
- discard 9/tcp sink null
- discard 9/udp sink null
- systat 11/tcp users
- systat 11/udp users
- daytime 13/tcp
- daytime 13/udp
- qotd 17/tcp quote
- qotd 17/udp quote
- msp 18/tcp # Message send protocol (historic)
- msp 18/udp # Message send protocol (historic)
- chargen 19/tcp ttytst source
- chargen 19/udp ttytst source
- # The latest IANA port assignments can be gotten from
- # http://www.iana.org/assignments/port-numbers
- # The Well Known Ports are those from 0 through 1023.
- # The Registered Ports are those from 1024 through 49151
- # The Dynamic and/or Private Ports are those from 49152 through 65535
- #
- # Each line describes one service, and is of the form:
- #
- # service-name port/protocol [aliases ...] [# comment]
- # The latest IANA port assignments can be gotten from
- # http://www.iana.org/assignments/port-numbers
- # The Well Known Ports are those from 0 through 1023.
- # The Registered Ports are those from 1024 through 49151
- # The Dynamic and/or Private Ports are those from 49152 through 65535
- #
- # Each line describes one service, and is of the form:
- #
- # service-name port/protocol [aliases ...] [# comment]
- tcpmux 1/tcp # TCP port service multiplexer
- tcpmux 1/udp # TCP port service multiplexer
- rje 5/tcp # Remote Job Entry
- rje 5/udp # Remote Job Entry
- echo 7/tcp
- echo 7/udp
- discard 9/tcp sink null
- discard 9/udp sink null
- systat 11/tcp users
- systat 11/udp users
- daytime 13/tcp
- daytime 13/udp
- qotd 17/tcp quote
- qotd 17/udp quote
- msp 18/tcp # Message send protocol (historic)
- msp 18/udp # Message send protocol (historic)
- chargen 19/tcp ttytst source
- chargen 19/udp ttytst source
- cat prefix data > data.new && mv data.new data
- sed -i.bak -e '1i first prefix line' -e '1i second prefix line' data
- printf '0r headerfilenxn' | ex file-with-contents
- printf '%sn' '0r headerfile' x | ex file-with-contents
- dd if=services bs=1 count="$(wc -c < header)" 2>/dev/null |
- cmp -s - header ||
- printf '%sn' '0r header' x |
- ex services
- cmp -sn "$(wc -c <header)" ||
- printf '%sn' '0r header' x | ex services
- sed -i '1i
- # The latest IANA port assignments can be gotten from
- # http://www.iana.org/assignments/port-numbers
- # The Well Known Ports are those from 0 through 1023.
- # The Registered Ports are those from 1024 through 49151
- # The Dynamic and/or Private Ports are those from 49152 through 65535
- #
- # Each line describes one service, and is of the form:
- #
- # service-name port/protocol [aliases ...] [# comment]' file
- sed '1s/.*/n&/g' examplefile| sed '1r file2.txt' | sed '1d'
- $ cat - file.txt | sponge file.txt
- # The latest IANA port assignments can be gotten from
- # http://www.iana.org/assignments/port-numbers
- # The Well Known Ports are those from 0 through 1023.
- # The Registered Ports are those from 1024 through 49151
- # The Dynamic and/or Private Ports are those from 49152 through 65535
- #
- # Each line describes one service, and is of the form:
- #
- # service-name port/protocol [aliases ...] [# comment]
- cat header.txt file.txt | sponge file.txt
- cat header file.txt >file.tmp ; mv file.tmp file.txt
Add Comment
Please, Sign In to add comment