C++ Help with file handle and simple statistics problem asking...
Input_file:
Desired output file:
Source Code try:
I only have idea to read the file.
Unfortunately, I don't know how to use the content inside input file to calculate its total number of content besides ">"
Apart from that, how should I do in order to let the program analysis any type of file instead of specific input file name at the source code?
eg.
program_name refers to the program that help to calculate the content in any type of input_file except ">";
any_input_file_name refer to the any input file name as long as its content is contain ">" and its respectively content;
output_file_name refer to the total character in the input_file exclude ">". In my case, output_file_name should shown "30"
Thanks for any advice.
Last edited by perl_beginner; 06-20-2011 at 06:36 AM..
Hi itkamaraj,
Thanks for reply.
Sorry that if my question misleading you
Actually the following command:
program_name refers to the program that help to calculate the content in any type of input_file except ">";
any_input_file_name refer to the any input file name as long as its content is contain ">" and its respectively content;
output_file_name refer to the total character in the input_file exclude ">". In my case, output_file_name should shown "30"
Thanks again for your advice.
---------- Post updated at 08:33 PM ---------- Previous update was at 04:36 AM ----------
Does anybody have any idea about my problem ?
Thanks first.
I have a file size is around 24 G with 14 columns, delimiter with "|"
My requirement- can anyone provide me the fastest and best to get the below results
Number of records of the file
First column and second Column- Unique counts
Thanks for your time
Karti
------ Post updated at... (3 Replies)
I am facing issue related to performance of one customized application running on RHEL 5.9. The application stalls for some unknown reason that I need to track. For that I require some tool or shell scripts that can monitor the CPU usage statistics (what we get in TOP or in more detail by other... (6 Replies)
I'm running long integrations on a remote server, and I'm working in terminal in a tcsh shell.
I'm looking to write ONLY the timing statistics to a file.
For example:
$time ls >timer.out
writes both the files in my current directory & the timer statistics to the file timer.out.
I only... (2 Replies)
Hi,
I have an HTML form through which I get some text as input. i need to run a shell script say script.sh inside a perl-cgi script named main_cgi.sh on the form input.
I want to write the contents of the form in a file and then perform some command line operations like grep, cat on the text... (0 Replies)
Hi ,
I have the following file which is basically a grid (has more than 100000 rows)
LLL1 PPP1
LLL1 PPP2
LLL1 PPP3
...............
LLL1 5500
.....
LLL2 PPP1
LLL2 PPP2
LLL2 PPP3
...............
LLL1 5500
.....
L100 PPP1
L100 PPP2
L100 PPP3
...............
2100 5500... (6 Replies)
I know how to check if any file has a unix process using a file by looking at 'lsof <fullpath/filename>' command.
I think using lsof is very expensive. Also to make it accurate we need to inlcude fullpath of the file.
Is there another command that can tell if a file has a truely active... (12 Replies)
Hi,
I want to write a shell script which handle an oracle alert log so that when it changes month, the script generates a new file with month in the filename.
Thanks in advance.
Leim (4 Replies)
Is there any command in Unix (HP-UX) which will give me the file statistics ..
e.g
I have a file called r001
if I created that file on 2nd of aug 2005 and till now I changed that file contents 10 times. So how will I get the history statistic(time & date) of file modification. (1 Reply)
All,
I am having three function
1.open
2.process
3.close.
Open will open a file and process will process a file and close will close the file ..
I can able to close the file by its filehandler.Is there is anyway that i can get the file name by filehandle and remove it after... (5 Replies)