Hi,
I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value .
For Eg .
if the input file has a row :
abc xyz lmn 89 lm nk o p
I would like the script to create something like... (9 Replies)
I have data like:
Blue Apple 6
Red Apple 7
Yellow Apple 8
Green Banana 2
Purple Banana 8
Orange Pear 11
What I want to do is if $2 in a row is the same as $2 in the previous row remove that row. An identical $2 may exist more than one time.
So the out file would look like:
Blue... (4 Replies)
hi guys, today i'm stuck in a new problem.
the title explain more or less but a particular had been omitted. So i'm going to describe below the situation with an example.
I have different html files and each of them have a consecutive lines group inside that i want to extract.
example:
... (8 Replies)
Hi
I want to remove the first row in a list of files and am trying to do via the following.
I've tried various quotes to redirect the modifed file to a newly named version of itself but no joy.
Can you help?
> for i in 'ls A*'; do sed '1d' $i > $i"_complete"; done
bash: $i"_complete":... (4 Replies)
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Hello,
I am looking for a way to remove words from a list that contain 3 or more of the same character.
For example lets say the full list is as follows
ABCDEF
ABBHJK
AAAHJD
KKPPPP
NAUJKS
AAAHJD & KKPPPP should be removed from this list as obviously they contain AAA and PPPP... (7 Replies)
Hi. How can I read row number from one file and print that corresponding record present at that row in another file.
eg
file1
1
3
5
7
9
file2
11111
22222
33333
44444
55555
66666
77777
88888
99999 (3 Replies)
this is the requirement
list.txt
table1
table2
table3
testfile.txt
name#place#data#select * from table1
name2#place2#data2#select * from table 10 innerjoin table3
name2#place2#data2#select * from table 10
output
name place table1
name2 place table3
i tried using awk (7 Replies)
I am trying to remove $1 along with the blank values from the file. Thank you :).
file
R_Index Chr Start End Ref Alt Func.IDP.refGene Gene.IDP.refGene GeneDetail.IDP.refGene Inheritence ExonicFunc.IDP.refGene AAChange.IDP.refGene avsnp147 PopFreqMax ... (5 Replies)
Discussion started by: cmccabe
5 Replies
LEARN ABOUT OPENSOLARIS
commandlog
commandlog(4) Sun Cluster File Formats commandlog(4)NAME
commandlog - command log file
SYNOPSIS
/var/cluster/logs/commandlog
DESCRIPTION
The commandlog ASCII text file contains records of selected Sun Cluster commands that are executed in a cluster. The logging of commands
starts automatically when you set up the cluster and ends when you shut down the cluster.
Commands that are not logged in this file include those that display the configuration and current state of the cluster. Commands that are
logged in this file include those that configure and change the current state of the cluster, as follows:
o claccess
o cldevice
o cldevicegroup
o clinterconnect
o clnasdevice
o clnode
o clquorum
o clreslogicalhostname
o clresource
o clresourcegroup
o clresourcetype
o clressharedaddress
o clsnmphost
o clsnmpmib
o clsnmpuser
o cltelemetryattribute
o cluster
o scconf
o scdidadm
o scdpm
o scgdevs
o scrgadm
o scshutdown
o scswitch
Each record in the commandlog file contains the following information:
o Date and timestamp
o Host name from the which the command was executed
o Process ID of the command
o ID of the user who executed the command
o Command that the user executed, including all options and operands
Note -
Command options are quoted in the commandlog file to enable you to copy, paste, and execute them in the shell.
o Exit status or signal of the executed command
By default, the commandlog file is regularly archived at the end of every week. Sun Cluster maintains up to eight previously archived com-
mandlog files on each cluster node at any given time.
EXAMPLES
Example 1 /var/cluster/logs/commandlog File
The following example shows the contents of a typical /var/cluster/logs/commandlog file:
11/11/2006 09:43:36 phys-schost-1 5758 root START - clrg add "app-sa-1"
11/11/2006 09:43:36 phys-schost-1 5758 root END 0
11/11/2006 09:43:36 phys-schost-1 5760 root START - clrg set -y
"RG_description=Department Shared Address RG" "app-sa-1"
11/11/2006 09:43:37 phys-schost-1 5760 root END 0
11/11/2006 09:44:15 phys-schost-1 5810 root START - clrg online "app-sa-1"
11/11/2006 09:44:15 phys-schost-1 5810 root END 0
11/11/2006 09:44:19 phys-schost-1 5222 root END -20988320
12/02/2006 14:37:21 phys-schost-1 5542 jbloggs START - clrg -c -g "app-sa-1"
-y "RG_description=Joe Bloggs Shared Address RG"
12/02/2006 14:37:22 phys-schost-1 5542 jbloggs END 0
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWsczu |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO scha_control(1HA), scha_resource_setstatus(1HA), scconf(1M), scdidadm(1M), scdpm(1M), scgdevs(1M), scrgadm(1M), scshutdown(1M),
scswitch(1M), attributes(5)Sun Cluster 3.2 18 Jul 2006 commandlog(4)