I have some files in a directory with two different extensions which get created everyday. Can you please help me out in getting the average file size for both these extensions and checking it with the last two file sizes of the same file extension ?
To be more clear..
Lets say I have 10 files of which 5 are with .log and other 5 with .txt extensions.
I need to find average size of all .log files and compare it with the latest created .log file size and report if its size is less
Many thanks in advance
---------- Post updated at 02:13 AM ---------- Previous update was at 01:21 AM ----------
I tried to build up a script and came up with the following snippet:
When I run it, it returns empty.
wondering if this the correct way to compare two values ?
Can anyone help me find and replace blank rows in a file with a numeric value (ie blankrow=someTxtOrNumValue), the file is over 500,000 rows long so it would need to be the quickest way as I'll need to do this for multiple files...I would be greatfull for any suggestions....thanks
sample file:... (2 Replies)
Hi,
I am using ksh.
I have to find wether data file has EOL or not. as per my knowledge we can easily find by checking each character. But this is a tedious job as per my requirement because my data file size is very big . It may be in 25-30 MB.
So please advice me how i can check wether... (4 Replies)
Hi,
I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern.
Note:These are the samples of two files,but i can have more... (2 Replies)
Ok, I am new to UNIX and Shell scripting and I am trying to do the following using a korn shell script:
I have a large data file that is loaded into a database, this data file is split into parts to make it more manageable based on a size parameter. The file contains many account records, the... (1 Reply)
Hi everyone.
Could u be so kind and help me with on "simple" shell script?
1. i need to search a file line by line for a pattern.
example of a lines in that file
2947 domain = feD,id = 00 0A 02 48 17 1E 1D 39 DE 00 0E 00,Name
Values:snNo = f10
Add AttFlag = 0
2. i need to find... (0 Replies)
I'm trying to write a script that will look in an /exports folder for the oldest export file and move it to a /staging folder. "Oldest" in this case is actually determined by date information embedded in the file names themselves.
Also, the script should only move a file from /exports to... (6 Replies)
Hey all!
So this is my problem: when a txtfile is processed, its moved to a directory called YYMMDDHHMMSSSS.
Example: /Processed/090624005217
And I want to check that the file ends up in that folder. One of my problems is that I dont know the exact name of that folder..
Then i want to... (2 Replies)
Hi Experts,
I had to edit (a particular value) in header line of a very huge file so for that i wanted to search & replace a particular value on a file which was of 24 GB in Size. I managed to do it but it took long time to complete. Can anyone please tell me how can we do it in a optimised... (7 Replies)
Hello I'm having a little difficulty in writing a shell script for a few simple tasks.
First I have two files "file1.txt" and "file2.txt" and I want to read and compare the last line of each file. The files look like this.
File1.txt
File2.txt
After comparing the two lines I would... (2 Replies)
I am running a UNIX script to get unused files and their sizes from the server. The issue is arising due to the spaces present in the filename/folder names.Due to this the du -k command doesn't work properly.But I need to calculate the size of all files including the ones which have spaces in them.... (4 Replies)
Discussion started by: INNSAV1
4 Replies
LEARN ABOUT SUSE
file_select_ex
file_select_ex(3alleg4) Allegro manual file_select_ex(3alleg4)NAME
file_select_ex - Displays the Allegro file selector with a caption.
SYNOPSIS
#include <allegro.h>
int file_select_ex(const char *message, char *path, const char *ext, int size, int w, int h);
DESCRIPTION
Displays the Allegro file selector, with the message as caption. The path parameter contains the initial filename to display (this can be
used to set the starting directory, or to provide a default filename for a save-as operation). The user selection is returned by altering
the path buffer, whose maximum capacity in bytes is specified by the size parameter. Note that it should have room for at least 80 charac-
ters (not bytes), so you should reserve 6x that amount, just to be sure. The list of files is filtered according to the file extensions in
the ext parameter. Passing NULL includes all files; "PCX;BMP" includes only files with ".PCX" or ".BMP" extensions. If you wish to control
files by their attributes, one of the fields in the extension list can begin with a slash, followed by a set of attribute characters. Any
attribute written on its own, or with a '+' before it, indicates to include only files which have that attribute set. Any attribute with a
'-' before it indicates to leave out any files with that attribute. The flag characters are "r" (read-only), "h" (hidden), "s" (system),
"d" (directory) and "a" (archive). For example, an extension string of "PCX;BMP;/+r-h" will display only PCX or BMP files that are read-
only and not hidden. The directories are not affected in the same way as the other files by the extension string: the extensions are never
taken into account for them and the other attributes are taken into account only when 'd' is mentioned in the string; in other words, all
directories are included when 'd' is not mentioned in the string. The file selector is stretched to the width and height specified in the w
and h parameters, and to the size of the standard Allegro font. If either the width or height argument is set to zero, it is stretched to
the corresponding screen dimension. This function returns zero if it was closed with the Cancel button or non-zero if it was OK'd.
SEE ALSO gui_fg_color(3alleg4)Allegro version 4.4.2 file_select_ex(3alleg4)