i am trying to count the fields in a file.
Input:
output:
Cout of the fileds for each row
When i try with above awk command i am getting the below output and it is not working as expected.
Any suggestion using awk command for couting the fields.
Last edited by Scott; 02-02-2013 at 03:54 AM..
Reason: More code tags
Is there a way to count the no. of fields (columns) in a file?
Actually I need to cut some fields starting from the middle to the end. How can I specify to cut till last field?
thanks in advance
:) (4 Replies)
I'm working on formatting some attendance data to meet a vendors requirements to upload to their system. With some help on the forums here, I have the data close. But they've since changed what they want.
The vendor wants me to submit three fields to them. Field 1 is the studentid field,... (4 Replies)
hi forums
i need help with a little problem i am having.
i need to count the number of fields that are in a saved variable so i can use that number to make a different function work properly.
is there a way of doing this without using SED/AWK?
anything would be greatly appreciated (4 Replies)
Hello All,
I got a requirement when I was working with a file. Say the file has unloads of data from a table in the form
1|121|asda|434|thesi|2012|05|24|
1|343|unit|09|best|2012|11|5|
I was put into a scenario where I need the field count in all the lines in that file. It was simply... (6 Replies)
Hi experts,
I need to print the first field first then last two fields should come next and then i need to print rest of the fields.
Input :
a1,abc,jsd,fhf,fkk,b1,b2
a2,acb,dfg,ghj,b3,c4
a3,djf,wdjg,fkg,dff,ggk,d4,d5
Expected output:
a1,b1,b2,abc,jsd,fhf,fkk... (6 Replies)
Hi,
file1.txt
AAA
BBB
CCC
DDD
file2.txt
abc|AAA|AAAabcbcs|fnwufnq
bca|nwruqf|AAA|fwfwwefwef
fmimwe|BBB|fnqwufw|wufbqw
wcdbi|CCC|wefnwin|wfwwf
DDD|wabvfav|wqef|fwbwqfwfe
i need the count of rows of file1.txt present in the file2.txt
required output:
AAA 2 (10 Replies)
Hi
I have a file as below
<field1> <field2> <field3> ... <field_num1> <field_num2>
Trying to sort based on difference of <field_num1> and <field_num2> in desceding order and print all fields.
I tried this and it doesn't sort on the difference field .. Appreciate your help.
cat... (9 Replies)
In the below awk using the tab-delimited input, I am trying count the - symbol in $5 and output the count as well as the renamed condition ins. I am also count the - symbol in $6 and output the count as well as the renamed condition del. I am also count the tomes that in $5 and $6 there are... (6 Replies)
In the below awk I am trying output to one file those lines that match between $2,$3,$4 of file1 and file2 with the count in (). I am also trying to output those lines that are missing between $2,$3,$4 of file1 and file2 with the count of in () each. Both input files are tab-delimited, but the... (7 Replies)
I am trying to remove all the lines and spaces where the count in $4 or $5 is greater than 1 (more than 1 letter). The file and the output are tab-delimited. Thank you :).
file
X 5811530 . G C NLGN4X
17 10544696 . GA G MYH3
9 96439004 . C ... (1 Reply)
Discussion started by: cmccabe
1 Replies
LEARN ABOUT SUSE
corosync-objctl
COROSYNC-OBJCTL(8) System Manager's Manual COROSYNC-OBJCTL(8)NAME
corosync-objctl - Configure objects in the Object Database
SYNOPSIS
corosync-objctl [-c|-w|-d|-a|-t-h] <OBJECT-SPEC>...
DESCRIPTION
corosync-objctl is used to configure objects within the object database at runtime.
OBJECT-SPEC
There are two types of entities
Objects and Key=Value pairs
Objects
Objects are container like entities that can hold other entities. They are specified as "objectA"."objectB". An example is log-
ging.logger.
Key=Value pairs
These are the entities that actually hold values (read database "fields"). They are specified as object.key=value or just
object.key if you are reading.
OPTIONS -c Create a new object.
-d Delete an existing object.
-w Use this option when you want to write a new value to a key.
-a Display all values currently available.
-t Track changes to an object and it's children. As changes are made to the object they are printed out. this is kind of like a "tail
-f" for the object database.
-h Print basic usage.
EXAMPLES
Print the objOne object (shouldn't exist yet).
$ corosync-objctl objOne
Create the objOne object.
$ corosync-objctl -c objOne
Print the objOne object (empty).
$ corosync-objctl objOne
objOne
Write two new keys to the objOne object.
$ corosync-objctl -w objOne.max=3000 objOne.min=100
Print the objOne object (with the two new keys).
$ corosync-objctl objOne
objOne.min=100
objOne.max=3000
Delete the objOne.min key
$ corosync-objctl -d objOne.min=100
Prove that is gone.
$ corosync-objctl objOne
objOne.max=3000
Delete the whole objOne object.
$ corosync-objctl -d objOne
Prove that is gone.
$ corosync-objctl objOne
SEE ALSO confdb_initialize(3),
AUTHOR
Angus Salkeld
2008-07-29 COROSYNC-OBJCTL(8)