I have two files:
One is a list of numbers:
1
5
6
7
10
The second is a very long string
abcdefghijklmno......1234567890
I'd like to print a new file with a 5 character substring that starts at each the positions listed in the 1st file:
such as:
abcde (4 Replies)
hi
i need to name a file with a substring of a another file name.
i.e. if the old filename is abc.txt , the new filename should be abc_1.txt
i should get the substring of the file name and then name the new one
please let me know how to do it (4 Replies)
Hi,
I have a folder list as below, I want to write a script to return a list like:
CASTLE_BU_20080801
CAUSEWAY_BU_20080801
HUNGHOM_BU_20080801
:
:
Can anyone help?
Thanks!
Victor Cheung
List of the folder:
# ls
CASTLE_BU_20080801.DMP OFFICE_MY1_BU_20080801.DMP... (1 Reply)
I'm new to shell scripting and am trying to write a small script that pulls a substring out of a file that has a few lines of text in it. The file will eventually have a lot of text, I just put a few lines in it for testing purposes.
Anyway, this is what I have so far...
#!/bin/ksh
... (4 Replies)
Hi,
I have a file with a long string, in the format:
name1=value,name2=value2.....namen=valuen
I want to query the file and extract 'value2' ONLY. name2=value2 can exist anywhere within the file.
Can anyone help me please wth a suitable BASH command?
Many thanks,
Matt (4 Replies)
Hi,
In my shell script. I am reading all files in directory.
And say if the file names are as follows:
adio_idfl_201302_df.txt
dfa_201301_dll.ctl
dalkd_20130301.csv
I would like to extract the numeric piece of each file name and display as follows:
201302
201301
20130301
I... (9 Replies)
Hello,
I have in my backup folder, files with names convention like this :
randomFileNames_13-02-2014_23h13m09+1392333189
randomFileNames_14-02-2014_02h13m09+1392343989
randomFileNames_14-02-2014_04h13m09+1392351189
etc....
Base on timestamp at end of the filename, I would to delete all the... (7 Replies)
Hello,
A question please.
A have a file that contains a string. Ex:
AAAABBCCCCCDDEEEEEEEEEEFF
I'd want to recover 2 substrings, 'BB' and 'FF' and then leave them in a new file.
Could anoyone help me please?
Thanks in advance (3 Replies)
Hello,
A question please.
A have a file that contains a string. Ex:
AAAABBCCCCCDDEEEEEEEEEEFF
I'd want to recover 2 substrings, 'BB' and 'FF' and then leave them in a new file.
From position 5, 2 caracters (ex:"BB") and from position 25, 2 caracters (ex:"FF") in a file.
Could anoyone help me... (3 Replies)
I want to merge the lines by matching substring of the first file with first column of the second file.
file1:
S00739A_ACAGTG_L001_R1.fq.gz
S00739A_ACAGTG_L001_R2.fq.gz
S00739B_GCCAAT_L001_R1.fq.gz
S00739B_GCCAAT_L001_R2.fq.gz
S00739D_GTGAAA_L001_R1.fq.gz
S00739D_GTGAAA_L001_R2.fq.gz... (14 Replies)
Discussion started by: yifangt
14 Replies
LEARN ABOUT CENTOS
ypmake
ypmake(1M) System Administration Commands ypmake(1M)NAME
ypmake - rebuild NIS database
SYNOPSIS
cd /var/yp ; make [map]
DESCRIPTION
The file called Makefile in /var/yp is used by make(1S) to build the Network Information Service (NIS) database. With no arguments, make
creates dbm databases for any NIS maps that are out-of-date, and then executes yppush(1M) to notify slave databases that there has been a
change.
If you supply a map on the command line, make will update that map only. Typing make passwd will create and yppush the password database
(assuming it is out of date). Likewise, make ipnodes and make networks will create and yppush the ipnodes and network files, $(INET-
DIR)/ipnodes and $(DIR)/networks.
There are four special variables used by make: DIR, which gives the directory of the source files; NOPUSH, which when non-null inhibits
doing a yppush of the new database files; INETDIR, which gives the directory of the ipnodes source file; and DOM, which is used to con-
struct a domain other than the master's default domain. The default for DIR is /etc, and the default for INETDIR is /etc/inet. The default
for NOPUSH is the null string.
Refer to ypfiles(4) and ypserv(1M) for an overview of the NIS service.
If a NIS to LDAP (N2L) configuration file, /var/yp/NISLDAPmapping, is present, the NIS server components run in N2L mode. In N2L mode, the
server components use a new set of map files with an LDAP-prefix, based on the LDAP DIT. In N2L mode, authoritative NIS information is
obtained from the DIT. The NIS source files and ypmake have no role, and they should not be used. If ypmake is accidentally run, then the
server components will detect this, and will log a warning message. For additional information, see ypfiles(4).
FILES
/var/yp Directory containing NIS configuration files.
/etc/inet/hosts System hosts file.
/etc/inet Default directory for ipnodes source file.
/etc Default directory for source files other than ipnodes.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWypu |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO make(1S), nis+(1), makedbm(1M), rpc.nisd(1M), ypbind(1M), yppush(1M), ypserv(1M), ypclnt(3NSL), NISLDAPmapping(4), ipnodes(4), ypfiles(4),
ypserv(4)NOTES
The NIS makefile is only used when running the ypserv(1M) server to provide NIS services. If these are being provided by the NIS+
server running in NIS compatibility mode, see rpc.nisd(1M); this makefile is not relevant. See ypfiles(4) for more details.
The Network Information Service (NIS) was formerly known as Sun Yellow Pages (YP). The functionality of the two remains the same. Only the
name has changed. The name Yellow Pages is a registered trademark in the United Kingdom of British Telecommunications plc, and may not be
used without permission.
SunOS 5.10 19 Mar 2003 ypmake(1M)