10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am practising awk and decided to compare two columns and print the result of the comparison as third column
i/p data
c1,c2,c3
1,a,b
1,b,b
i am trying to compare the last two columns and if they match I am trying to print match else mismatch(Ideally i want that as a last column... (5 Replies)
Discussion started by: mkathi
5 Replies
2. UNIX for Beginners Questions & Answers
Hello All,
May i please know how do i ensure my split command would NOT generate incomplete output files like below, the last lines in each file is missing some columns or last line is complete.
split -b 50GB File File_
File_aa
|551|70210203|xxxxxxx|12/22/2010 20:44:58|11/01/2010... (1 Reply)
Discussion started by: Ariean
1 Replies
3. Shell Programming and Scripting
#cat /tmp/input
old_array old_dev new_dev new_array
0577 008AB 01744 0125
0577 008AC 01745 0125
0577 008AD 005C8 0125
0577 008AE 005C9 0125
0577 008AF 005CA 0125
0577 008B0 005CB 0125
0577 008B1 005CC 0125
cat test.sh
#!/bin/ksh... (4 Replies)
Discussion started by: mbak
4 Replies
4. Shell Programming and Scripting
Good Moring,
I am currently reading about awk in a manual and following the examples using the oratab file.
My system is SOLARIS 10
I think I am getting strange behavior judging by what the book says to do and what I am getting with my little program.
Here is my program:
grep -v oratab |... (4 Replies)
Discussion started by: bdby
4 Replies
5. Shell Programming and Scripting
lyang001@lyang001-OptiPlex-9010:~$ service --status-all |grep dbus
acpid
acpi-support
alsa-restore
alsa-store
anacron
apport
atd
avahi-daemon
bluetooth
cgroup-lite
console-setup
cron
cups
dbus
dmesg
dns-clean
failsafe-x
... (1 Reply)
Discussion started by: yanglei_fage
1 Replies
6. Shell Programming and Scripting
I have two files containing hundreds of different sequences with the same Identifiers (ID-001, ID-002, etc.,), something like this:
Infile1:
ID-001 ATGGGAGCGGGGGCGTCTGCCTTGAGGGGAGAGAAGCTAGATACA
ID-002 ATGGGAGCGGGGGCGTCTGTTTTGAGGGGAGAGAAGCTAGATACA
ID-003... (18 Replies)
Discussion started by: Xterra
18 Replies
7. Shell Programming and Scripting
Hi
I have written below script to get the data in table form.
#!/bin/sh
echo "File Name\tType"
for i in *;
do
echo "$i\t\c"
if ; then
echo "directory"
elif ; then
echo "symbolic link"
elif ; then
echo "file"
else
echo "unknown"
fi
donehowever i am getting output in different way... (3 Replies)
Discussion started by: scriptor
3 Replies
8. Shell Programming and Scripting
Hi All,
I am in middle of one script. I want output in the form of xls file.
There are 4 fields - user name, email Id, full name, date of birth. I want these details to get in seperate columns.
But, i am getting it in the single cell and as like a paragraph.:mad:
Please suggest me some... (8 Replies)
Discussion started by: Agupte
8 Replies
9. Web Development
We have a Java app that renders Localized text on user's browser session based upon browser language settings. The app reads the browser language settings and prepares the localized text. But recently we faced issues for Mozilla 5.0 version browser. Note our code works fine in IE. Taking an... (1 Reply)
Discussion started by: uunniixx
1 Replies
10. Shell Programming and Scripting
need to check hardware error are zero
iostat -en |awk '{ if ( $2 == 0 ) { print " " } else { print " Hardware errors "} }
can someone please tell me whats wrong with this
---------- Post updated at 10:19 PM ---------- Previous update was at 10:16 PM ----------
iostat -en
----... (11 Replies)
Discussion started by: arch12
11 Replies
scha_resourcetype_get(1HA) Sun Cluster Commands scha_resourcetype_get(1HA)
NAME
scha_resourcetype_get - access resource type information
SYNOPSIS
scha_resourcetype_get -O optag -T type
DESCRIPTION
The scha_resourcetype_get command accesses information about a resource type that is registered with the Resource Group Manager (RGM).
Use this command in shell script implementations of the callback methods for resource types that represent services that are controlled by
the RGM. This command provides the same information as the scha_resourcetype_get(3HA) C function.
Information is output by this command to the standard output (stdout) in formatted strings, as described in the scha_cmds(1HA) man page.
Output is a string or several strings that are output on separate lines. You can store the output in shell variables. You can also parse
the output by using the awk(1) command or other shell commands for further use by the script.
You need solaris.cluster.resource.read RBAC authorization to use this command. See the rbac(5) man page.
Authorized users can issue privileged Sun Cluster commands on the command line from the pfsh(1), pfcsh(1), or pfksh(1) profile shell. A
profile shell is a special kind of shell that enables you to access privileged Sun Cluster commands that are assigned to the Sun Cluster
Commands rights profile. A profile shell is launched when you run su(1M) to assume a role. You can also use pfexec(1) to issue privileged
Sun Cluster commands.
OPTIONS
The following options are supported:
-O optag Indicates the information to be accessed.
Note -
optag options, such as API_VERSION and BOOT, are not case sensitive. You can use any combination of uppercase and lowercase
letters when you specify optag options.
The following optag values retrieve the corresponding resource type properties. The value of the named property of the
resource's type is output.
API_VERSION
BOOT
FAILOVER
FINI
INIT
INIT_NODES
INSTALLED_NODES
IS_LOGICAL_HOSTNAME
IS_SHARED_ADDRESS
MONITOR_CHECK
MONITOR_START
MONITOR_STOP
PKGLIST
POSTNET_STOP
PRENET_START
RESOURCE_LIST
RT_BASEDIR
RT_DESCRIPTION
RT_SYSTEM
RT_VERSION
SINGLE_INSTANCE
START
STOP
UPDATE
VALIDATE
-T type Is the name of a resource type that is registered for use by the RGM cluster facility.
EXIT STATUS
The following exit values are returned:
0 The command completed successfully.
nonzero An error occurred.
Failure error codes are described scha_calls(3HA).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWscdev |
+-----------------------------+-----------------------------+
|Interface Stability |Stable |
+-----------------------------+-----------------------------+
SEE ALSO
awk(1), scha_cmds(1HA), scha_calls(3HA), scha_resourcetype_get(3HA), attributes(5), rt_properties(5)
Sun Cluster 3.2 31 May 2006 scha_resourcetype_get(1HA)