Hi,
I have huge file,
head -1 filneame gives,
I just want to remove "##colsep##" from the file, and also want to count the no. of fileds present, as in
Output shld be in newfile as TRADE_KEY,TRADE_DATE
and total no. of fileds separated by these comma's
... (7 Replies)
Hi,
Below is my input file and desired output file:
Input file:
>header_N_1
ASFDGDGNDGEGWETWRYWTETWNETOWETWETWNETTETNWET
.
.
Desired output file:
>header_N_1
ASFDGDGDGEGWETWRYWTETWETOWETWETWETTETWET
.
.
From the input file, I just hope to exclude the 'N' word from its content... (5 Replies)
Hi, Gurus,
I have a file like
1 234, 345, 456
2 345, 456, 345
I want to use awk with multipe separator ( one is comma, another is space)print out $1, $3 which should be:
1, 345
2, 456
but I don't know how to put space as separator with another separator.
Thanks in advance (7 Replies)
I am familiar with using tar and exclude/include files:
tar zcf backup.dirs.tgz --files-from=include.mydirs --exclude-from=exclude.mydirs --no-recursion
but was wondering if I could use find in the same way. I know that you can just specify the directories to exclude but my list is... (2 Replies)
I have files such as
n02-z30-dsr65-terr0.25-dc0.008-16x12drw-run1.cmd
I am wondering if it is possible to define two field separators "-" and "."
for these strings so that $7 is run1. (5 Replies)
I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL.
I need the whole word... (6 Replies)
Hi,
I'm trying to parse a text file which uses commas as field separators. Fields are double quoted, and may themselves contain commas, like this:
"1","John Smith","London","123"
"2","Mary Robertson","Horsham, Sussex","456"
This causes problems for the following command
cut -d","... (7 Replies)
I am trying to count the occurrences of ALL words in a file. However, I want to exclude certain words: short words (i.e. <3 chars), and words contained in an blacklist file. There is also a desire to count words that are capitalized (e.g. proper names). I am not 100% sure where the line on... (5 Replies)
Hi,
I must be overlooking something, but I don't understand why this doesn't work. I'm trying to grep on a date, excluding all the lines starting with a dash:
testfile:
#2013-12-31
2013-12-31code:
grep '^2013-12-31' testfileI'm expecting to see just the second line '2013-12-31' but I don't... (3 Replies)
Well, guys I saw a question about GOTO for Python.
So this gave me the inspiration to attempt a GOTO function for 'dash', (bash and ksh too).
Machine: MBP OSX 10.14.3, default bash terminal, calling '#!/usr/local/bin/dash'...
This is purely a fun project to see if it is possible in PURE... (3 Replies)
Discussion started by: wisecracker
3 Replies
LEARN ABOUT LINUX
netmasks
netmasks(4) File Formats netmasks(4)NAME
netmasks - network mask database
SYNOPSIS
/etc/inet/netmasks
/etc/netmasks
DESCRIPTION
The netmasks file contains network masks used to implement IP subnetting. It supports both standard subnetting as specified in RFC-950 and
variable length subnetting as specified in RFC-1519. When using standard subnetting there should be a single line for each network that is
subnetted in this file with the network number, any number of SPACE or TAB characters, and the network mask to use on that network. Network
numbers and masks may be specified in the conventional IP `.' (dot) notation (like IP host addresses, but with zeroes for the host part).
For example,
128.32.0.0 255.255.255.0
can be used to specify that the Class B network 128.32.0.0 should have eight bits of subnet field and eight bits of host field, in addition
to the standard sixteen bits in the network field.
When using variable length subnetting, the format is identical. However, there should be a line for each subnet with the first field being
the subnet and the second field being the netmask that applies to that subnet. The users of the database, such as ifconfig(1M), perform a
lookup to find the longest possible matching mask. It is possible to combine the RFC-950 and RFC-1519 form of subnet masks in the net-
masks file. For example,
128.32.0.0 255.255.255.0
128.32.27.0 255.255.255.240
128.32.27.16 255.255.255.240
128.32.27.32 255.255.255.240
128.32.27.48 255.255.255.240
128.32.27.64 255.255.255.240
128.32.27.80 255.255.255.240
128.32.27.96 255.255.255.240
128.32.27.112 255.255.255.240
128.32.27.128 255.255.255.240
128.32.27.144 255.255.255.240
128.32.27.160 255.255.255.240
128.32.27.176 255.255.255.240
128.32.27.192 255.255.255.240
128.32.27.208 255.255.255.240
128.32.27.224 255.255.255.240
128.32.27.240 255.255.255.240
128.32.64.0 255.255.255.192
can be used to specify different netmasks in different parts of the 128.32.0.0 Class B network number. Addresses 128.32.27.0 through
128.32.27.255 have a subnet mask with 28 bits in the combined network and subnet fields (often referred to as the subnet field) and 4 bits
in the host field. Furthermore, addresses 128.32.64.0 through 128.32.64.63 have a 26 bits in the subnet field. Finally, all other
addresses in the range 128.32.0.0 through 128.32.255.255 have a 24 bit subnet field.
Invalid entries are ignored.
SEE ALSO ifconfig(1M), inet(7P)
Postel, Jon, and Mogul, Jeff, Internet Standard Subnetting Procedure, RFC 950, Network Information Center, SRI International, Menlo Park,
Calif., August 1985.
V. Fuller, T. Li, J. Yu, K. Varadhan, Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy, RFC 1519,
Network Information Center, SRI International, Menlo Park, Calif., September 1993.
T. Pummill, B. Manning, Variable Length Subnet Table For IPv4, RFC 1878, Network Information Center, SRI International, Menlo Park, Calif.,
December 1995.
NOTES
/etc/inet/netmasks is the official SVr4 name of the netmasks file. The symbolic link /etc/netmasks exists for BSD compatibility.
SunOS 5.10 7 Jan 1997 netmasks(4)