Sponsored Content
Top Forums Shell Programming and Scripting copy specific files and count them - not as easy as it seems! Post 302515734 by AlphaLexman on Wednesday 20th of April 2011 06:22:30 PM
Old 04-20-2011
@ DGPickett, could you explain what this construct does,
Quote:
Originally Posted by DGPickett
I like "script_chain | read var_name" over "var+name=$( script chain )" over "var_name=`script_chain`", it just flows left to right, no unnecessary nesting.
Relative to the code posted. I just don't get it.

TIA.
 

10 More Discussions You Might Find Interesting

1. Solaris

To copy the files newer than specific date

Dear all, Can you help me in copying files newer than speciifc date Thanks in advance, Rajesh (3 Replies)
Discussion started by: RAJESHKANNA
3 Replies

2. Shell Programming and Scripting

Recursively copy only specific files from a directory tree

Hi I am a shell-script newbie and am looking to synchronize certain files in two directory structures. Both these directory-trees are in CVS and so I dont want the CVS directory to be copied over. I want only .sh and .pl files in each subdirectory under these directory trees to be... (3 Replies)
Discussion started by: sharpsharkrocks
3 Replies

3. UNIX for Dummies Questions & Answers

Unix command to count the number of files with specific characters in name

Hey all, I'm looking for a command that will search a directory (and all subdirectories) and give me a file count for the number of files that contain specific characters within its filename. e.g. I want to find the number of files that contain "-a.jpg" in their name. All the searching I've... (6 Replies)
Discussion started by: murphysm
6 Replies

4. Shell Programming and Scripting

Need script to count specific word and iterate over number of files.

Hi Experts, I want to know the count of specific word in a file. I have almost 600+ files. So I want to loop thru each file and get the count of the specific word. Please help me on achieving this... Many thanks (2 Replies)
Discussion started by: elamurugu
2 Replies

5. Shell Programming and Scripting

How to copy specific files when you don't know the file name?

I hope this isn't as silly as it sounds from the title of the thread. I have software that outputs files where the name starts with a real number followed by underscore as a prefix to an input file name. These will list in the directory with the file with the smallest real number prefix as the... (5 Replies)
Discussion started by: LMHmedchem
5 Replies

6. Shell Programming and Scripting

How to copy a directory without specific files?

Hi I need to copy a huge directory with thousands of files onto another directory but without *.WMV files (and without *.wmv - perhaps we need to use *.). Pls advise how can I do that. Thanks (17 Replies)
Discussion started by: reddyr
17 Replies

7. Post Here to Contact Site Administrators and Moderators

How to count successfully copy files source to target location with check directory in Linux?

Hi guys...please any one help me .... how to copy files from source to target location if 5 files copied successfully out of 10 files then implement success=10 and if remaining 5 files not copied successfully then count error=5 how to implement this condition with in loop i need code linux... (0 Replies)
Discussion started by: sravanreddy
0 Replies

8. Shell Programming and Scripting

Rsync to copy specific subfolders and files to new directory

RootFolderI: RootFolderI/FolderA/Subfolder1/Subsub1/JPG1.jpg -> want this jpg RootFolderI/FolderA/Subfolder2/Subsub1/JPG2.jpg -> want this jpg RootFolderI/FolderA/Subfolder2/Subsub2/JPG3.jpg . . . RootFolderI/FolderB/Subfolder1/Subsub1/JPG4.jpg -> want this jpg ... (1 Reply)
Discussion started by: blocnt
1 Replies

9. Shell Programming and Scripting

Copy files based on specific word in a file name & its extension and putting it in required location

Hello All, Since i'm relatively new in shell script need your guidance. I'm copying files manually based on a specific word in a file name and its extension and then moving it into some destination folder. so if filename contains hyr word and it has .md and .db extension; it will move to TUM/HYR... (13 Replies)
Discussion started by: prajaktaraut
13 Replies

10. Shell Programming and Scripting

Copy Specific Files Recursively

Is it possible to only copy selected files+its directories when you are copying recursively? find /OriginalFolder/* -type -d \{ -mtime 1 -o -mtime 2 \ } -exec cp -R {} /CopyTo/'hostname'__CopyTo/ \; -print From the above line, I want to only copy *txt and *ini files from /OriginalFolder/* ... (4 Replies)
Discussion started by: apacheLinux
4 Replies
EvmEventFormat(3)					     Library Functions Manual						 EvmEventFormat(3)

NAME
EvmEventFormat(), EvmEventFormatFromTemplate(), EvmVarFormat() - format events for display SYNOPSIS
Library EVM Support Library Parameters buffer A pointer to a character string to receive the formatted event data. The stored string is null-terminated, even if trun- cated, unless the length operand is zero(0). length The maximum length (number of characters) of the output string. If the formatted event is longer than length, the output is truncated. event The event to be formatted. show_template The primary template for formatting the output. var_name The name of a variable data item of the event whose value is to be formatted. translate A Boolean value indicating whether I18N (internationalization) translation is to be attempted on the variable data item (var_name). If the translate operand is translation is attempted. In addition, the following conditions must be met: o The variable is of type string and includes an I18N (internationalization) message identifier o The event contains I18N (internationalization) catalog information. DESCRIPTION
Information contained in an event must be formatted into a readable format. The software which posts the event (event poster) supplies formatting information through the event's format data item. The routines described here explain the event formatting capabilities. The routine combines the supplied event's format data item with any data items or variables specified in the event's format item that are available in the event. returns a formatted version of the event in buffer. If the event contains I18N message catalog information, and the catalog is available in the user's locale, the format string is retrieved from the message catalog if possible. If no translation is possible, the format string from the event is used. If the event does not contain format information, produces a generic display of the event's name and any variables. The routine also formats the supplied event. uses the supplied show_template string as its primary formatting template. Literal charac- ters in show_template are transferred to the buffer unchanged. Any token of the form or is replaced by the value of the corresponding data item from the supplied event, if it is present. item_name is the name of the item stored in the event. If width is supplied, the value occupies a minimum of width character positions. width is an integer number specifying the size of the value stored in item_name. The item_name is the name of a standard event data item. The special string is replaced by the results of applying to the event. Refer to evmshow(1) and EvmEvent(5) for more information about formatting events for display. retrieves a variable called var_name from the supplied event, and returns a formatted version of its value in buffer. If translate is I18N translation is applied as appropriate. Notes Floating point values are formatted using the format specifier. RETURN VALUE
The operation completed without error. One of the arguments to the function is invalid. A value in a structure member is invalid. An operation failed because an attempt to acquire heap memory failed. ERRORS
The value of is not set. SEE ALSO
Commands evmshow(1), locale(1). Routines EvmEventDump(3), printf(3S), setlocale(3C). Event Management EVM(5). EVM Events EvmEvent(5). EvmEventFormat(3)
All times are GMT -4. The time now is 07:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy