10-24-2017
I mean it worked perfectly on my linux system, and so there's no reason to believe it doesn't on yours unless you show us
- your OS, shell, find, and sed versions
- input data (file names, directory contents, files' contents)
- DETAILED error description
- system and / or error messages
What do you expect people in here to work upon?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
well i have this file here:
<XML>
<pregate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<system_c>HPREGATE</system_c>
<trans_c>HSPG</trans_c>
<trans_dt>20060105161333</trans_dt>
<user_id_m></user_id_m>
<func_c>C</func_c>
</pregate>
</XML>
i want to... (2 Replies)
Discussion started by: forevercalz
2 Replies
2. Shell Programming and Scripting
Greetings.
I am struggling with a shell script to make my life simpler, with a number of practical ways in which it could be used. I want to take a standard text file, and pull the 'n'th word from each line such as the first word from a text file.
I'm struggling to see how each line can be... (5 Replies)
Discussion started by: tricky
5 Replies
3. Shell Programming and Scripting
Hello experts,
I know line number of the word I want to replace. Can "sed" substitute word on a specific line?
As well, can sed substitute words inside a specific patten.
ex. <word>lalala</word> #replace anything between <word> and </word>
minifish (2 Replies)
Discussion started by: minifish
2 Replies
4. Shell Programming and Scripting
I want to reformat the following:
ID1 ID001 0 0 2 1 GG TC GG CT GG AA AA AG
ID2 ID002 0 0 2 2 GG 00 AG CC GG GG TC CC
I want to replace only:... (1 Reply)
Discussion started by: genehunter
1 Replies
5. Shell Programming and Scripting
Hi
I'm trying to substitute word "January" with word "March" in my script but in certain lines only.
I have couple words containing pattern that I want to substitute e.g.
- log.January.1.array
- log_January_1_array_1
- log.January.1.array
- log_January_1_array_11
Trying to do cmd below... (9 Replies)
Discussion started by: presul
9 Replies
6. Shell Programming and Scripting
I'd like to do this using Perl command line (sorry no awk, sed, etc.)
replace the 3 middle lines in a file by one line:
aaa 123
bbb 234
ccc 34567
dd 4567
ee 567
to:
aaa 123
AAA
ee 567
I tried this but not working:
perl -pi -e "s/aaa\ 123\nbbb\ 234\nccc\ 34567/AAA/" file (2 Replies)
Discussion started by: tintin78899
2 Replies
7. Shell Programming and Scripting
hi
I would like to ask if someone knows a command or a script on how to rename a multiple file in the directory starting at the end of the filename or at the .extension( i would like to remove the last 11 character before the extension) for example
Below is the result of my command ls inside... (5 Replies)
Discussion started by: jao_madn
5 Replies
8. Shell Programming and Scripting
I need to make ~96 configure files from a template config file which has hundreds of rows that looks like:
template.config:
#average insert size
avg_ins=1000
......
other information omitted
Those config files are named in sequence from S01.config, S02.config, ... etc
with different... (11 Replies)
Discussion started by: yifangt
11 Replies
9. Shell Programming and Scripting
i need to substitute word on a specific line.
I was able to do it on command line like below but it is not working in vi.
command line like below:
sed -e '8s/table_name/schema.table_name/' file_name.
in vi table_name and schema are my positional parameters that i pass into the
script.
... (5 Replies)
Discussion started by: pimmit22043
5 Replies
10. Shell Programming and Scripting
Dear All,
I would like to instantiate a "pattern file" substituting "variable name" by their content.
Saying, we have:
1/ a "pattern file" containing different "variable name", the first character of the "variable name" is "@":
$ cat TPTModl.txt
DEFINE... (12 Replies)
Discussion started by: dae
12 Replies
LEARN ABOUT SUSE
hostname
HOSTNAME(7) Linux Programmer's Manual HOSTNAME(7)
NAME
hostname - hostname 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 Internet 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
task is generally performed by either getaddrinfo(3) or the obsolete gethostbyname(3).) Hostnames are resolved by the Internet name
resolver in the following fashion.
If the name consists of a single component, that is, contains no dot, and if the environment variable HOSTALIASES is set to the name of a
file, that file is searched for any 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-insensitive 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 by searching through a list of domains until a match is found. The
default search list includes first the local domain, then its parent domains with at least 2 name components (longest first). 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 there is only one component remaining from the local domain. The
search path can be changed from the default by a system-wide configuration file (see resolver(5)).
SEE ALSO
gethostbyname(3), resolver(5), mailaddr(7), named(8)
COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2008-06-11 HOSTNAME(7)