The below code is to check if number of lines in file greater than two then status is not ok else status is ok.
I need to optimize it in single line code in awk or sed if possible.
#!/usr/bin/perl
use strict;
use warnings;
use Date::Manip;
my $date_converted = UnixDate(ParseDate("3 days ago"),"%e/%h/%Y");
open FILE,">$ARGV";
while(<DATA>){
my @tab_delimited_array = split(/\t/,$_);
$tab_delimited_array =~ s/^\ =~ s/^\-//;
my $converted_date =... (2 Replies)
Pl help to me to write the below code in a simple way ...
i suupose to use this code 3 to 4 places in my makefile(gnu) ..
****************************************
@for i in $(LIST_A); do \
for j in $(LIST_B); do\
if ;then\
echo "Need to sign"\
echo "List A = $$i , List B =$$j"\
... (2 Replies)
Hi,
I have a requirement with,
No~Dt~Notes
1~2011/08/1~"aaa
bbb
ccc
ddd
eee
fff
ggg
hhh"
Single column alone got splitted into multiple lines.
I require the output as
No~Dt~Notes
1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh"
mean to say those new lines to be... (1 Reply)
Hi,
My Oracle query is returing below o/p
----------------------------------------------------------
Ins trnas value
a lkp1 x
a lkp1 y
b lkp1 a
b lkp2 x
b lkp2 y ... (7 Replies)
Here is my code. What it does is it reads an input file (input.txt which contains roughly 2,000 search phrases) and searches a directory for files that contains the search phrase. The directory contains roughly 1900 files and 84 subdirectories. The output is a file (output.txt) that shows only the... (23 Replies)
Hi All,
I have 4 big files which contains one big line containing formatted character records, I need to format each file in such way that each File will have 95 Characters per line. Last line of each file will have newline character at end.
Before:-
File Name:- File1.dat
102 121340560... (10 Replies)
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Hi guys,
I feel a bit comfortable now doing bash scripting but I am worried that the way I do it is not optimized and I can do much better as to how I code.
e.g.
I have a whole line in a file from which I want to extract some values.
Right now what I am doing is :
STATE=`cat... (5 Replies)
clsetup(1CL) Sun Cluster Maintenance Commands clsetup(1CL)NAME
clsetup - configure Sun Cluster interactively
SYNOPSIS
/usr/cluster/bin/clsetup -V
/usr/cluster/bin/clsetup -?
/usr/cluster/bin/clsetup [-f logfile]
DESCRIPTION
The clsetup command provides the following configuration capabilities, depending on what state the cluster is in when you issue the com-
mand. The user must be superuser to run this command.
This command has no short form.
o When you run the clsetup command at post-installation time, the command performs initial setup tasks, such as configuring quorum
devices and resetting the installmode property. If you deselected automatic Quroum Configuration when you created the cluster
using either scinstall or the cluster create command, then you must run the clsetup command immediately after the cluster has
been installed. Ensure that all nodes have joined the cluster before you run the clsetup command and reset the installmode prop-
erty.
If you used automatic quorum configuration when you created the cluster, you do not need to run the clsetup command after clus-
ter installation. The automatic quorum configuration feature also resets the installmode property of the cluster.
You can issue this form of the clsetup command from any node in the cluster.
o When you run the clsetup command during normal cluster operation, the scsetup command provides an interactive, menu-driven util-
ity to perform cluster configuration tasks. The following are some of the cluster components which this utility administers:
o Quorum
o Resource groups
o Data services
o Cluster interconnect
o Device groups and volumes
o Private hostnames
o New nodes
o Other cluster properties
You can issue this form of the clsetup command from any node in the cluster.
o When you run the clsetup command from a node that is in noncluster mode, the clsetup command provides a menu-driven utility for
changing and displaying the private IP address range.
You must reboot all nodes into noncluster mode before you start this form of the clsetup utility.
OPTIONS
The following options are supported:
-?
--help
Prints help information for the command.
-f logfile
--file logfile
Specifies the name of a log file to which commands can be logged. If this option is specified, most command sets generated by clsetup
can br run and logged, or just logged, depending on user responses.
-V
--version
Prints the version of the command set. No command line processing will be performed and the command will not enter into its interactive
menu.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWsczu |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO Intro(1CL), cldevicegroup(1CL), clnode(1CL), clquorum(1CL), clreslogicalhostname(1CL), clresourcegroup(1CL), clresourcetype(1CL),
clressharedaddress(1CL), cluster(1CL), cltelemetryattribute(1CL)Sun Cluster 3.2 5 May 2006 clsetup(1CL)