Sponsored Content
Full Discussion: Displaying Files Problem
Top Forums Shell Programming and Scripting Displaying Files Problem Post 302562550 by polineni on Friday 7th of October 2011 09:06:44 AM
Old 10-07-2011
Displaying Files Problem

To match all filename comprising at least three characters not beginning with a dot
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Displaying files

I am beginner to UNIX. I wanted to display 5 filesname with size from BIN directory. The order of display should be descending order in size. Can help me. (1 Reply)
Discussion started by: giridher2000
1 Replies

2. UNIX for Dummies Questions & Answers

Displaying files in a directory

Dear Experts, I am new to UNIX and I have a script below and in this test case I am reading the names of the files in the present directory into a variable and then looping through each file name and displaying the name back to the screen. The problem I have is although there are 5 files in the... (4 Replies)
Discussion started by: markjohnlowe
4 Replies

3. Shell Programming and Scripting

problem with displaying date and adding time

Hi, I have a log file with contents like 81.49.74.131 - - 81.49.74.131 - - 116.112.52.31 - - 116.112.52.31 - - I need an output like this 81.49.74.131 14/Sep/2008 Time duration: 00:06:00 116.112.52.31 15/Sep/2008 Time duration: 00:00:01 Please anyone suggest a script for this.... (1 Reply)
Discussion started by: FuncMx
1 Replies

4. Shell Programming and Scripting

Displaying a list of files

Given a set of log files like trail.<timestamp> that are generated hourly, how do I get the list of files created for the current date, using shell script? Can anyone please help me?the format of the trace file is trail.YYYYMMDDhh I also need to know how I can "grep" for a particular word in these... (2 Replies)
Discussion started by: ggayathri
2 Replies

5. Shell Programming and Scripting

Displaying difference of 2 files

Hi All, Got this 2 file namely a.txt and b.txt, i want to know how to extract the difference between the two files, the output will be written to a file. e.g. >>a.txt<< Nokia 1100 Nokia 1200 Nokia 1300 Nokia 1400 Nokia 1500 Nokia 1600 Nokia 1700 Nokia 1701 Nokia 1702 Sagem 1100... (3 Replies)
Discussion started by: shtobias
3 Replies

6. Shell Programming and Scripting

Displaying list of backup files using for loop

Hi, I want to display list of last 10 backup files (with numbering) from the temporary file c:/tmp/tmp_list_bkp.txt Example : 1) backup_file1 2) backup_file2 3) backup_file3 ........ ........ I tried as below but not working. for file in c:/tmp/tmp_list_bkp.txt do echo... (3 Replies)
Discussion started by: milink
3 Replies

7. Shell Programming and Scripting

Displaying Files Problem

To match all filename comprising at least three characters the first character is numeric and the last character is not alphabetic (2 Replies)
Discussion started by: polineni
2 Replies

8. Programming

C++ problem displaying parameters using dOxygen

I have written some C++ code with documentation code for dOxygen as below. However the parameters are not showing up. /// \file /// /// #ifndef __VECT2_HH__ #define __VECT2_HH__ #include <iostream> #include <assert.h> #include <cmath> #include "common.hh" ... (0 Replies)
Discussion started by: kristinu
0 Replies

9. Linux

Problem in displaying message on RHEL6 on EFI during PXE boot

Hi, I am doing PXE boot for RHEL6.4 on EFI and want to display custom messsage before loading vmlinuz and initrd.img, which is not working. boot server side (In case of BIOS client): In /var/lib/tftpboot/default file I am putting the message in below format: SAY hello world boot... (0 Replies)
Discussion started by: indus123
0 Replies

10. Shell Programming and Scripting

Problem while displaying(cat) file content inside telnet loop .

Hi Team, Not getting the file output inside my email which i am sending from unix box. . Please refer the below code : #!/bin/sh { sleep 5 echo ehlo 10.56.185.13 sleep 3 echo mail from: oraairtel@CNDBMUREAPZP02.localdomain sleep 3 echo rcpt to: saurabhtripathi@anniksystems.com... (1 Reply)
Discussion started by: tripathi1990
1 Replies
filelib(3erl)						     Erlang Module Definition						     filelib(3erl)

NAME
filelib - File utilities, such as wildcard matching of filenames DESCRIPTION
This module contains utilities on a higher level than the file module. The module supports Unicode file names, so that it will match against regular expressions given in Unicode and that it will find and process raw file names (i.e. files named in a way that does not confirm to the expected encoding). If the VM operates in Unicode file naming mode on a machine with transparent file naming, the fun() provided to fold_files/5 needs to be prepared to handle binary file names. For more information about raw file names, see the file module. DATA TYPES
filename() = string() | atom() | DeepList | RawFilename DeepList = [char() | atom() | DeepList] RawFilename = binary() If VM is in unicode filename mode, string() and char() are allowed to be > 255. RawFilename is a filename not subject to Unicode translation, meaning that it can contain characters not conforming to the Unicode encoding expected from the filesystem (i.e. non-UTF-8 characters although the VM is started in Unicode filename mode). dirname() = filename() EXPORTS
ensure_dir(Name) -> ok | {error, Reason} Types Name = filename() | dirname() Reason = posix() -- see file(3erl) The ensure_dir/1 function ensures that all parent directories for the given file or directory name Name exist, trying to create them if necessary. Returns ok if all parent directories already exist or could be created, or {error, Reason} if some parent directory does not exist and could not be created for some reason. file_size(Filename) -> integer() The file_size function returns the size of the given file. fold_files(Dir, RegExp, Recursive, Fun, AccIn) -> AccOut Types Dir = dirname() RegExp = regular_expression_string() Recursive = true|false Fun = fun(F, AccIn) -> AccOut AccIn = AccOut = term() The fold_files/5 function folds the function Fun over all (regular) files F in the directory Dir that match the regular expression RegExp (see the re module for a description of the allowed regular expressions). If Recursive is true all sub-directories to Dir are processed. The regular expression matching is done on just the filename without the directory part. If Unicode file name translation is in effect and the file system is completely transparent, file names that cannot be interpreted as Unicode may be encountered, in which case the fun() must be prepared to handle raw file names (i.e. binaries). If the regular expression contains codepoints beyond 255, it will not match file names that do not conform to the expected character encoding (i.e. are not encoded in valid UTF-8). For more information about raw file names, see the file module. is_dir(Name) -> true | false Types Name = filename() | dirname() The is_dir/1 function returns true if Name refers to a directory, and false otherwise. is_file(Name) -> true | false Types Name = filename() | dirname() The is_file/1 function returns true if Name refers to a file or a directory, and false otherwise. is_regular(Name) -> true | false Types Name = filename() The is_regular/1 function returns true if Name refers to a file (regular file), and false otherwise. last_modified(Name) -> {{Year,Month,Day},{Hour,Min,Sec}} | 0 Types Name = filename() | dirname() The last_modified/1 function returns the date and time the given file or directory was last modified, or 0 if the file does not exist. wildcard(Wildcard) -> list() Types Wildcard = filename() | dirname() The wildcard/1 function returns a list of all files that match Unix-style wildcard-string Wildcard . The wildcard string looks like an ordinary filename, except that certain "wildcard characters" are interpreted in a special way. The following characters are special: ? : Matches one character. * : Matches any number of characters up to the end of the filename, the next dot, or the next slash. [Character1,Character2,...] : Matches any of the characters listed. Two characters separated by a hyphen will match a range of characters. Example: [A-Z] will match any uppercase letter. {Item,...} : Alternation. Matches one of the alternatives. Other characters represent themselves. Only filenames that have exactly the same character in the same position will match. (Match- ing is case-sensitive; i.e. "a" will not match "A"). Note that multiple "*" characters are allowed (as in Unix wildcards, but opposed to Windows/DOS wildcards). Examples: The following examples assume that the current directory is the top of an Erlang/OTP installation. To find all .beam files in all applications, the following line can be used: filelib:wildcard("lib/*/ebin/*.beam"). To find either .erl or .hrl in all applications src directories, the following filelib:wildcard("lib/*/src/*.?rl") or the following line filelib:wildcard("lib/*/src/*.{erl,hrl}") can be used. To find all .hrl files in either src or include directories, use: filelib:wildcard("lib/*/{src,include}/*.hrl"). To find all .erl or .hrl files in either src or include directories, use: filelib:wildcard("lib/*/{src,include}/*.{erl,hrl}") wildcard(Wildcard, Cwd) -> list() Types Wildcard = filename() | dirname() Cwd = dirname() The wildcard/2 function works like wildcard/1 , except that instead of the actual working directory, Cwd will be used. Ericsson AB stdlib 1.17.3 filelib(3erl)
All times are GMT -4. The time now is 06:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy