02-10-2009
Filtering the sentences
hi vanitham,
I have tried the below program with kornshell script. It was working fine..
Kindly check it.
#!/bin/ksh
IFS=""
<your declaration of sentences>
#set -A num 0 1 2 3 4 5 6 7 8 9
set -A alist $a0 $a1 $a2 $a3 $a4 $a5 $a6 $a7 $a8 $a9 $a10
for i in 0 1 2 3 4 5 6 7 8 9 10
do
if [[ ${#alist[$i]} -gt 300 ]]; then
echo "a[$i] = ${alist[$i]}\n"
fi
done
exit 0
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hello,
i'm looking to split up text into a list of words but can't figure it out, any help would be great.
thanks
steven (2 Replies)
Discussion started by: stevox
2 Replies
2. Shell Programming and Scripting
Hi,
I have to identify sentences from this text.
If i split these statements by this way:
@sentence= split(/\.\W*/,$text);
I will get these following things also in the output along with proper sentences.
Biol Reprod.
2002 Mar;66(3):785-95.
Egydio de Carvalho C, Tanaka H,... (2 Replies)
Discussion started by: vanitham
2 Replies
3. Shell Programming and Scripting
Hi,
I have sentences like this:
$sent=
Protein modeling studies reveal that the RG-rich region is part of a three to four strand antiparallel beta-sheet, which in other RNA binding protein functions as a platform for nucleic acid interactions.
Heterogeneous nuclear ribonucleoparticle... (19 Replies)
Discussion started by: vanitham
19 Replies
4. Shell Programming and Scripting
Hi,
I have a file and that file contains the following sentences.
Here we show that a virus-encoded transcription factor, viral mRNA, cellular RNA-binding protein heterodimer G3BP/Caprin-1 (p137), translation initiation factors eIF4E and eIF4G, and ribosomal proteins are concentrated in the... (4 Replies)
Discussion started by: vanitham
4 Replies
5. Programming
hi,
I want to compile a program in C. It have a multiple calls to teradata. I have no idea how to compile in Aix.
The compiler that I should be use is cc.
I tried
cc -G -KPIC tdsfbd0358.c this generates a tdsfbd0358.i and after I have no Idea what I have to make, a link? how?... (3 Replies)
Discussion started by: kajum
3 Replies
6. UNIX for Dummies Questions & Answers
Hi guys
Need your help how do I extract sentences with only a word
i.e.
today is hot
hot
very
humid
humid2
Sample output
hot
very (0 Replies)
Discussion started by: jamestan
0 Replies
7. Shell Programming and Scripting
Hi guys
Need your help how do I extract sentences with only a word
i.e.
today is hot
hot
very
humid
humid2
Sample output
hot (6 Replies)
Discussion started by: jamestan
6 Replies
8. Shell Programming and Scripting
I am trying to print out sentences that meets a regular expression in awk (I’m open to using other tools, too).
I got the regular expression I want to use, "(\+ \{4\})" from user ripat in a grep forum. Unfortunately with grep I couldn't print only the sentence.
While searching for awk... (8 Replies)
Discussion started by: danbroz
8 Replies
9. Shell Programming and Scripting
Hi
I have two lists of patterns named A and B consisting of around 200 entries in each and I want to extract all the sentences from a big text file which match atleast one pattern from both A and B.
For example, pattern list A consists of :
ama
ani
ahum
mari
...
...
and pattern... (1 Reply)
Discussion started by: my_Perl
1 Replies
10. Shell Programming and Scripting
Hello all
I am doing a Makefile but I can't return the value of $var to use it in conditional sentences:
#!/bin/sh
GO=$(shell) go
GOPATH=$(GO) env GOPATH
make:
@$(GOPATH)
@if ; then mkdir -p "$(GOPATH)/bin" ; fi
When I type "make", @$GOPATH returns /home/icvallejo/go... (5 Replies)
Discussion started by: icvallejo
5 Replies