Note that the suggestions test if the preceding character is a digit, not if a field that consists of a number ends with a dot. For example if one of the fields would be A1. then this approach would fail.
An alternative would be to split it into fields and test each field if it is numeric and if it ends in a dot. For example:
Hi all,
I have a bunch of files that are named like 12543, 467249877, etc all over some directories.These files are named only with numbers, they dont have any letters or special characters in their file names. Could you please help me out and give me some command/script to remove only those... (6 Replies)
Hi,
I am trying to cleanup 7 or 10 digits numeric from the file. So for example :
Input :
3M Corporation
3M Inc. 888-356-8765
3M Inc. 356-8765
3M Inc. 3568765
3M Inc. 356-8765
3M 8883568765 Inc.
Output :
3M Corporation
3M Inc. - -
3M Inc. -
3M Inc.
3M Inc. - (8 Replies)
I have a file that has some text that looks like this
Some Text
1. More text
2. Different text
Final Text
I would like the remove the lines of text that start with the numbers.
Some Text
Final Text
I have tried to use cat file.txt | grep -Ev 1. >... (9 Replies)
Hello,
I am working with a list that contains a large number of files listed by their absolute path. I am trying to determine a way to delete the file name at the end of each line, therefore leaving just the directory path. For example, I'd like to go from:
/home/something/file... (2 Replies)
Hi, I have multiple large files which consist of the below format:
I am trying to write an awk or sed script to remove all occurrences of the 00 record except the first and remove all of the 80 records except the last one.
Any help would be greatly appreciated. (10 Replies)
Hi all,
I need to do scrip for printing starting and ending numbers along with count in given file.:wall:
Input: a.txt
10000030
10000029
10000028
10000027
10000026
10000024
10000023
10000021
10000018
10000018
10000017
10000016
10000015
10000014 (2 Replies)
I have a file of a content like this:
abc_bla -def 800
abc_bla -def 802
abc_bla -def 804
abc_bla -def 806
abc_bla -def 808
abc_bla -def 810
abc_bla -def 812
abc_bla -def 814
...
abc_bla -def 898
abc_bla -def 900
abc_bla -def 902
abc_bla -def 904
...
abc_bla -def 990
abc_bla -def... (7 Replies)
Discussion started by: maya3
7 Replies
LEARN ABOUT BSD
hostname
HOSTNAME(7) Miscellaneous Information Manual HOSTNAME(7)NAME
hostname - host name resolution description
DESCRIPTION
Hostnames are domains, where a domain is a hierarchical, dot-separated list of subdomains; for example, the machine monet, in the Berkeley
subdomain of the EDU subdomain of the ARPANET would be represented as
monet.Berkeley.EDU
(with no trailing dot).
Hostnames are often used with network client and server programs, which must generally translate the name to an address for use. (This
function is generally performed by the library routine gethostbyname(3).) Hostnames are resolved by the internet name resolver in the fol-
lowing fashion.
If the name consists of a single component, i.e. contains no dot, and if the environment variable ``HOSTALIASES'' is set to the name of a
file, that file is searched for an string matching the input hostname. The file should consist of lines made up of two white-space sepa-
rated strings, the first of which is the hostname alias, and the second of which is the complete hostname to be substituted for that alias.
If a case-sensitive match is found between the hostname to be resolved and the first field of a line in the file, the substituted name is
looked up with no further processing.
If the input name ends with a trailing dot, the trailing dot is removed, and the remaining name is looked up with no further processing.
If the input name does not end with a trailing dot, it is looked up in the local domain and its parent domains until either a match is
found or fewer than 2 components of the local domain remain. For example, in the domain CS.Berkeley.EDU, the name lithium.CChem will be
checked first as lithium.CChem.CS.Berkeley.EDU and then as lithium.CChem.Berkeley.EDU. Lithium.CChem.EDU will not be tried, as the there
is only one component remaining from the local domain.
SEE ALSO gethostbyname(3), resolver(5), mailaddr(7), named(8), RFC883
4.2 Berkeley Distribution November 21, 1987 HOSTNAME(7)