10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
how to search and replace string in column in file with command sed or other
search "INC0000003.in" and replace column 4 = "W"
$ cat file.txt
INC0000001.in|20150120|Y|N|N
INC0000002.in|20150120|Y|N|N
INC0000003.in|20150120|Y|N|N
INC0000004.in|20150120|Y|N|Noutput... (4 Replies)
Discussion started by: ppmanja3
4 Replies
2. UNIX for Dummies Questions & Answers
Is there a single Command in Unix to get the following Information when searching for files containing one or more strings in a Unix Directory (including sub directories within it) :
1) Complete filename ( path and filename)
2) Owner of the file
3) Size of the file
4) Last Modified date... (3 Replies)
Discussion started by: pchegoor
3 Replies
3. Shell Programming and Scripting
I have a file with
<suit:run date="Trump Tue 06/19/2012 11:41 AM EDT" machine="garg-ln" build="19921" level="beta" release="6.1.5" os="Linux">
Need to find word "build" then
extract build number, which is 19921 also
release number, which is 6.1.5 then
concatenate them to one variable as... (6 Replies)
Discussion started by: garg
6 Replies
4. Shell Programming and Scripting
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies
5. Shell Programming and Scripting
Hi All,
I am very new to UNIX and I have tried this for a longtime now and unable to crack it....
There is a file that is continuously updating. I need to search for the string and find the date @ which it updated every day.....
eg:
String is "work started"
The log entry is as below:
... (1 Reply)
Discussion started by: Nithz
1 Replies
6. Shell Programming and Scripting
I'd like to copy strings from a log file and put them into a CSV.
The strings could be on different line numbers, depending on size of log.
Example Log File:
File = foo.bat
Date = 11/11/11
User = Foo Bar
Size = 1024
...
CSV should look like:
"foo.bat","11/11/11","Foo Bar","1024" (7 Replies)
Discussion started by: chipperuga
7 Replies
7. Shell Programming and Scripting
Hi,
I search all forum, but I can not find solutions of my problem :(
I have multiple files (5000 files), inside there is this data :
FILE 1:
1195.921 -898.995 0.750312E-02-0.497526E-02 0.195382E-05 0.609417E-05
-2021.287 1305.479-0.819754E-02 0.107572E-01 0.313018E-05 0.885066E-05
... (15 Replies)
Discussion started by: guns
15 Replies
8. Shell Programming and Scripting
Input file is on Linux box and the input file has data in just one line with 1699741696 characters.
Sample Input:
<xxx><document coll="uspatfull" version="0"><CMSdoc>xxxantivirus</CMSdoc><tag1>1</tag1></document><document coll="uspatfull"... (5 Replies)
Discussion started by: gaya
5 Replies
9. Shell Programming and Scripting
Hi, guys. I have one question:
I need to search for a string in a file, and then extract another string from the file and assign it to a variable.
For example:
the contents of the file (group) is below:
...
ftp:x:23:
mail:x:34
...
testing:x:2001
sales:x:2002
development:x:2003
...... (6 Replies)
Discussion started by: daikeyang
6 Replies
10. Shell Programming and Scripting
Hi,
I need to append string "Hi" to the beginning of the lines containing some specific string. How can I achieve that?
Please help.
Malay (1 Reply)
Discussion started by: malaymaru
1 Replies
platform(4) File Formats platform(4)
NAME
platform - directory of files specifying supported platforms
SYNOPSIS
.platform
DESCRIPTION
The Solaris operating environment release includes the .platform directory, a new directory on the Solaris CD image. This directory con-
tains files (created by Sun and Solaris OEMs) that define platform support. These files are generically referred to as platform definition
files. They provide a means to map different platform types into a platform group.
Platform definition files in the .platform directory are used by the installation software to ensure that software appropriate for the
architecture of the system will be installed.
Sun provides a platform definition file named .platform/Solaris . This file is the only one that can define platform groups to which other
platform definition files can refer. For example, an OEM platform definition file can refer to any platform group specified in the Solaris
platform definition file.
Other platform definition files are delivered by OEMs. To avoid name conflicts, OEMs will name their platform definition file with an OEM-
unique string. OEMs should use whatever string they use to make their package names unique. This unique string is often the OEM's stock
symbol.
Comments are allowed in a platform definition file. A "#" begins a comment and can be placed anywhere on a line.
Platform definition files are composed of keyword-value pairs, and there are two kinds of stanzas in the file: platform group definitions
and platform identifications.
o Platform group definitions:
The keywords in a platform group definition stanza are:
PLATFORM_GROUP The PLATFORM_GROUP keyword must be the first keyword in the platform group definition stanza. The value
assigned to this keyword is the name of the platform group, for example:
PLATFORM_GROUP=sun4c
The PLATFORM_GROUP name is an arbitrary name assigned to a group of platforms. However, PLATFORM_GROUP typi-
cally equals the output of the uname -m command. PLATFORM_GROUP value cannot have white space and is limited
to 256 ASCII characters.
INST_ARCH The instruction set architecture of all platforms in the platform group, for example:
INST_ARCH=sparc
The INST_ARCH keyword value must be the value returned by the uname -p command on all platforms in the plat-
form group.
o Platform identifications:
The keywords in a platform identification stanza are:
PLATFORM_NAME The PLATFORM_NAME keyword must be the first keyword in the platform identification stanza. The PLAT-
FORM_NAME is the name assigned to the platform, for example:
PLATFORM_NAME=SUNW,SPARCstation-5
Typically, this name is the same as the value returned by the uname -icommand on the machine, but it need
not be the same.
The PLATFORM_NAME value cannot have white space and is limited to 256 ASCII characters. If it contains
parentheses, it must contain only balanced parentheses. For example. the string "foo(bar)foo" is a valid
value for this keyword, but "foo(bar" is not.
The other keywords in the platform identification stanza can be in any order, as long as the PLATFORM_NAME
keyword is first.
PLATFORM_ID The value returned by the uname -i command on the machine, for example:
PLATFORM_ID=SUNW,SPARCstation-5
MACHINE_TYPE The value returned by the uname -m command on the machine, for example:
MACHINE_TYPE=sun4c
IN_PLATFORM_GROUP The platform group of which the platform is a member, for example:
IN_PLATFORM_GROUP=sun4c
The platform group name must be specified in the same file as the platform identification stanza or in the
platform definition file with the name .platform/Solaris .
The IN_PLATFORM_GROUP keyword is optional. A platform doesn't have to belong to a platform group. If a
platform is not explicitly assigned to a platform group, it essentially forms its own platform group, where
the platform group name is the PLATFORM_NAME value. The IN_PLATFORM_GROUP value typically equals the output
of the uname -m command. IN_PLATFORM_GROUP value cannot have white space and is limited to 256 ASCII char-
acters.
INST_ARCH The instruction set architecture of the platform, for example:
INST_ARCH=sparc
This field is only required if the platform does not belong to a platform group. The INST_ARCH keyword
value must be the value returned by the uname -i command on all platforms in the platform group.
COMPATIBILITY
The installation program will remain compatible with the old Solaris CD format. If a Solaris CD image does not contain any platform defini-
tion files, the installation and upgrade programs will select the packages to be installed based on machine type, that is, the value
returned by the uname -p command.
EXAMPLES
Example 1 Platform Group Definitions
The following example shows platform group definitions from the .platform/Solaris platform definition file.
#
PLATFORM_GROUP=sun4u
INST_ARCH=sparc
Example 2 Platform Identification Stanzas
The following example shows platform identification stanzas, which define systems that belong in a platform group, from the .plat-
form/Solaris platform definition file.
#
PLATFORM_NAME=SUNW,SunFire
PLATFORM_ID=SUNW,SunFire
IN_PLATFORM_GROUP=sun4u
PLATFORM_NAME=SUNW,Ultra-80
PLATFORM_ID=SUNW,Ultra-80
IN_PLATFORM_GROUP=sun4u
#
PLATFORM_NAME=SUNW,SunFire
PLATFORM_ID=SUNW,SunFire
IN_PLATFORM_GROUP=sun4u
#
PLATFORM_NAME=SUNW,Ultra-80
PLATFORM_ID=SUNW,Ultra-80
IN_PLATFORM_GROUP=sun4u
FILES
The .platform directory must reside as /cd_image/Solaris_vers/.platform, where
cd_image Is the path to the mounted Solaris CD (/cdrom/cdrom0/s0 by default) or the path to a copy of the Solaris CD on a disk.
Solaris_vers Is the version of Solaris, for example, Solaris_2.9.
NOTES
Typically, a platform identification stanza contains either a PLATFORM_ID or a MACHINE_TYPE stanza, but not both.
If both are specified, both must match for a platform to be identified as this platform type. Each platform identification stanza must con-
tain either a PLATFORM_ID value or a MACHINE_TYPE value. If a platform matches two different platform identification stanzas--one which
matched on the value of PLATFORM_ID and one which matched on the value of MACHINE_TYPE , the one that matched on PLATFORM_ID will take
precedence.
The .platform directory is part of the Solaris CD image, whether that be the Solaris CD or a copy of the Solaris CD on a system's hard
disk.
SunOS 5.11 19 Nov 2002 platform(4)