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)
scversions(1M) System Administration Commands scversions(1M)NAME
scversions - Sun Cluster version management
SYNOPSIS
scversions [-c]
DESCRIPTION
Note -
Beginning with the Sun Cluster 3.2 release, Sun Cluster software includes an object-oriented command set. Although Sun Cluster software
still supports the original command set, Sun Cluster procedural documentation uses only the object-oriented command set. For more infor-
mation about the object-oriented command set, see the Intro(1CL) man page.
The scversions command commits the cluster to a new level of functionality after a rolling-upgrade to new Sun Cluster software. With no
arguments, the scversions command prints a message indicating whether a commitment is needed.
OPERANDS
The following operands are supported:
-c Commit the set of nodes that are currently active members of the cluster to the highest possible level of functionality.
When you upgrade a node (either through upgrade to a new release of the product or by application of a patch) and boot it back
into the cluster, some of the internal protocols on that node might have to run at lower versions in order to cooperate cor-
rectly with other nodes in the cluster. When the cluster is in this state, some administrative actions might be disabled and
some new functionality introduced in the upgrade might be unavailable.
When you run this command once from any node after all nodes are upgraded, the cluster switches to the highest versions of
internal protocols possible. Assuming that all nodes have the same Sun Cluster software installed at that time, all new func-
tionality becomes available and any administrative restrictions are removed.
If a node that has not been upgraded is an active member of the cluster at the time you run the -c option to scversions, the
command has no effect because the cluster is already running at the highest possible level of functionality.
If a node has not been upgraded and is not an active member of the cluster when you run the -c option to scversions (for exam-
ple, if that node is down for maintenance), the internal protocols of the cluster are upgraded to the highest possible ver-
sions. You might have to upgrade the node that was not an active member of the cluster to enable it to rejoin the cluster.
EXIT STATUS
0 Success
non-zero Failure
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWsczu |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO scinstall(1M)Sun Cluster 3.2 17 Aug 2007 scversions(1M)