Hmmm - there's quite some syntax errors in your script (assuming your (unmentioned) shell is bourne type, e.g. bash, or ksh), obviously logic error(s) as well. Would you mind to use an awk solution?
given your awk version allows for a zero length field separator yielding every single char in the input line as a field of its own .
Hello, Member or professional
need help how to count characters by line of file
Example of the file is here
cdr20080817164322811681txt
cdr20080817164322811txt
cdr20080817164322811683txt
cdr20080817164322811684txt
I want to count the characters by line of file . The output that I... (4 Replies)
Hi all,
I like to know how to get the count of each character in a given word. Using the commands i can easily get the output. How do it without using the commands ( in shell programming or any programming)
if you give outline of the program ( pseudo code )
i used the following commands
... (3 Replies)
to delete the duplicate characters in a file I used this code
cat file.txt|tr -s ""
tell the other ways using sed
command to count of duplicate characters
thanks:) (0 Replies)
Hi i have data like
abchd 124 ldskc aattggcc
each separated by tab space i want to count number of characters in 4th column and print it in new column with tabspace for every line can anyone help me how to do it.
Thanks. (3 Replies)
Hi everyone, and thanks after all
I'm a biologist and i have to extract information from one text. The text is something like this
1023 A A 56 0 cc...,,,,..gg..Cc.c,,c..CC..,,
1024 T T 86 0 ..,,,..aaAA..,,aAA,,a,,A,,a
1025 G G 125 0 ... (5 Replies)
Hi All!
I would like to solve a problem but I have no clue of how do it!I will be grateful if someone could help me!
I have a file like this:
> genes | transcript
...sequence....
>ENSMUSG00000006638|ENSMUST00000006814
GGGAAATGGAATACCCCTACACAACCAAGATGCTGAGTTCCTCCCTGAGCCCGCAAAACG... (2 Replies)
My variable is something like:
f="/Volumes/VERVE/MOOTON_CALL/01_shots/XX/xx0195/Projects/program/rs0195_v400001.aep"
I use ${f:63:6} to call "rs0195" as characters counted from the left, but it'd be so much easier to count from the right.
If ${f:95:10} counts from the left, what would... (2 Replies)
I was wondering how I would go around to do this.
This is an example of my output
Sun Aug 21 2016 03:00:00, BLAH
Mon Aug 22 2016 03:54:00, BLAH
Tue Aug 23 2016 04:22:11, BLAH
Thu Aug 25 2016 05:00:00, BLAH
Now what I would like to do is only count CONSECUTIVE days so in the... (1 Reply)
I have the following file:
A1 4.5807 6.4202
B1 2.5704 11.4414
C1 5.5607 5.28872
D1 3.5807 8.2132
E1 3.2206 9.13153
F1 3.0907 9.51532
G1 3.2707 8.99165
H1 2.4607 11.9515
A2 2.5505 11.5307
B2 2.3106 12.7279
C2 3.8507 7.63731
D2 2.6208 11.2214
E2 2.7609 10.652
F2 2.0604 14.2734
G2... (2 Replies)
Discussion started by: Xterra
2 Replies
LEARN ABOUT REDHAT
igawk
IGAWK(1) Utility Commands IGAWK(1)NAME
igawk - gawk with include files
SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ...
igawk [ all gawk options ] [ -- ] program-text file ...
DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1).
AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like
@include getopt.awk
in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path.
OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports.
EXAMPLES
cat << EOF > test.awk
@include getopt.awk
BEGIN {
while (getopt(ARGC, ARGV, "am:q") != -1)
...
}
EOF
igawk -f test.awk
SEE ALSO gawk(1)
Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995.
AUTHOR
Arnold Robbins (arnold@skeeve.com).
Free Software Foundation Nov 3 1999 IGAWK(1)