02-27-2008
hi blowtorch,
thanks for the reply.
Ooo...I see..
I did "vi" my text file, and it has 1937 lines.
So, to make wc -l worked right, I have to make one blank line after the end of line.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
consider this file "master" which contains data as
11:skjs:24:asd2
1:skdfjk:23:sfdf
12:su:25:jkh5
13:gre:22:kljl7
14:sai:34:kjg7
I am trying to enter data into the file "master"
i want to count the number of times 11 is present in the file "master" that to in the first filed... (5 Replies)
Discussion started by: uni_ajay_r
5 Replies
2. UNIX for Dummies Questions & Answers
I have a text file that has 5719 rows when I open it up in a text editor. When I do a wc -l in Unix however, it says that I have 5718 rows. What could be causing this difference? (1 Reply)
Discussion started by: ssmith001
1 Replies
3. Shell Programming and Scripting
Hi all!
I have a question regarding possibilities to do line counts.
SEARCH_VAR=TEX
rsh $REM_HOST -l $REM_USER "cd $REM_DIR; ls *$SEARCH_VAR* 2> /dev/null" | sort -n | awk 'BEGIN { FS = "-" } ; { print $1"\t"$0 }'
Will produce an output on the screen like this:
483 483-SOME-TEXT-1... (1 Reply)
Discussion started by: bbergstrom74
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a script which removes 2 header records and 1 trailer record in a list of files. The commands doing the actions are
sed '1,2d' $file > tempfile1.dat
sed '$d' < tempfile1.dat > $output.txt
Its working fine for all records except a file having size=1445509814 and number of... (2 Replies)
Discussion started by: ayanbiswas
2 Replies
5. Shell Programming and Scripting
I want to keep a count of a all the records processed in a input file. The input file would have a lot of data containing various information. Lets say I make a pattern that only prints out data with the amount $37.57. How would I go about keeping track of how many $37.57 appears?
I have... (2 Replies)
Discussion started by: Boltftw
2 Replies
6. Shell Programming and Scripting
Hi,
I am having .csv files contains some row -
Info: Value of field name 'SecurityExchange' is not supported ","Original Order Tuple
Please see the below perl code carefully-
/Info: (+),Original (\w+) Tuple/ and do {
($category, $type) = ($1, $2);
if($type eq 'Execution')... (1 Reply)
Discussion started by: pspriyanka
1 Replies
7. Shell Programming and Scripting
:wall:
Hello there,
basically in my program where im stuck at is when it comes to rename the files in a loop.
- the program counts the number of files w a given name (works!)
- and then if the number of files is greater or equal to the MAX_VERSIONS (numbers of files allowed w the... (1 Reply)
Discussion started by: thurft
1 Replies
8. Shell Programming and Scripting
Hi,
I am trying to make a script which should execute if the same is not getting executed already.
To implement this check, I wrote a fragment of code as below
$ cat abc.sh
#!/bin/bash
check=0
#grepping "sh -x abc.sh" because if i check only for "abc.sh" and the file is open in say... (12 Replies)
Discussion started by: sam05121988
12 Replies
9. Shell Programming and Scripting
hi every one i have written this simple shell for counting number of word that user need to find from file
but i have get several error when run it. can someone tell me the problem ?
echo "Enter the file name"
read file
echo "enter word"
read word
for i in \`cat $file`
do
if
then... (1 Reply)
Discussion started by: nimafire
1 Replies
10. Shell Programming and Scripting
Hi Everyone,
I'm new to unix scripting. Hoping you guys can help me out. I am trying to create a script that will do a count command for each file (in this example *.dat) within a predefined directory and display only the filename without the full path.
This is what I got so far, but it... (10 Replies)
Discussion started by: kadawtomtom978
10 Replies