06-18-2009
thanx the last solution is working
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to count the number of occurence of perticular word from one text file.
Please tell me "less" command is work in ksh or not. If it is not working then instead of that which command will work. :confused: (40 Replies)
Discussion started by: rinku
40 Replies
2. Shell Programming and Scripting
Hi,
My objective is to get the line number of the first occurance of the search pattern.
my test.txt contains:
..... ..................
total rows....
................... ..
total rejected rows: 40
total rejected rows: 50
total rejected rows: 80
total rejected rows: 90
total... (9 Replies)
Discussion started by: mercuryshipzz
9 Replies
3. Shell Programming and Scripting
Hi,I am new to shell scripting and i want to find the line numbers of matching braces.
The file contents are as follows
File XXX.dat
1 ( CLASS "FRUIT"
2 (TYPE "PERSISTENT")
3 (MESSAGE_TYPE "M")
4 (GET_REQRD "Y")
5 (SET_REQRD "Y")
6 )
7 ( CLASS... (3 Replies)
Discussion started by: Rajendra_1510
3 Replies
4. Shell Programming and Scripting
Hi there
does anybody know how i can get the line number from an entry or entries in a file ?? for example if i had a file
test1
test2
test3
test1
and i needed to get the line numbers for all instances of test1 in that file
with the answer being (1,4)
Would anybody be able... (7 Replies)
Discussion started by: hcclnoodles
7 Replies
5. Shell Programming and Scripting
Hello All,
What i am doing is , i tail a file from certain chatacter and then cat -n to get the line numbers.I search for a particular string and gets it line number. What i am interested in is the next line immediately after the pattern i search.
But grep gives me result for all line... (5 Replies)
Discussion started by: kailash19
5 Replies
6. Shell Programming and Scripting
Hi Guys,
Please help me out in my situation of writing a shell script
Exampl:I have a output like
asnapply 1 2 3 apply_server=1 apply_schema=ASN
asnapply 1 2 3 apply_server=2 apply_schema=ASN
Now i need output like
asnacmd applysever=1 applyschema=ASN stop
asnacmd applysever=2... (16 Replies)
Discussion started by: mallak
16 Replies
7. Shell Programming and Scripting
Hi Frnds,
I need to find the line number of a particular line in a file and store that line number to a variable.
if a file named myfile contains following
look at the sun
look at the moon
look at the star
look at the ocean
i need to get the line number of the line 'look at the... (3 Replies)
Discussion started by: mvignesh
3 Replies
8. Shell Programming and Scripting
Hello,
I am trying to find out the line numbers where regex match and put them into a file with below command:
awk '/'$pat'/ {print NR}' $fileName >> temp.txt
where $pat is the regex
but this command is taking a lot of time to execute with bigger files for size more than 5000000... (8 Replies)
Discussion started by: JoeColeEPL9
8 Replies
9. Shell Programming and Scripting
example:
i have the following text file...
i am very tired.
i am busy
i am hungry
i have to find the number of occurence of a particular word 'am' from the text file.. can any one give the shell script for it (34 Replies)
Discussion started by: sheela
34 Replies
10. Shell Programming and Scripting
Hi,
I have a simple problem but i guess stupid enough to figure it out. i have thousands rows of data. and i need to find match patterns of two columns and print the number of rows. for example:
inputfile
abd abp 123
abc abc 325
ndc ndc 451
mjk lkj... (3 Replies)
Discussion started by: redse171
3 Replies