Sponsored Content
Top Forums Shell Programming and Scripting Compound command with 'find' utility? Post 85324 by blowtorch on Tuesday 4th of October 2005 03:04:09 PM
Old 10-04-2005
This is UUOC. Just use
Code:
find . -name "*.conf"  -exec grep "#" {} \; > /tmp/comments.list

 

10 More Discussions You Might Find Interesting

1. Programming

Threaded 'find' utility

I need to modify my version of find in unix and get it to create and use two POSIX threads to carry out concurrent finding operations. How do i get about doing this>? If anyone could help me it would be much appreciated. Thanx Mariuca (1 Reply)
Discussion started by: mariuca
1 Replies

2. UNIX for Dummies Questions & Answers

can't find my NEDIT utility after shell change

Hello, My System Admin. just switched me from KSH to BASH and something happened to my "nedit" utility! Does anyone know how to reactivate nedit by anychance? Thanks very much! BobK (2 Replies)
Discussion started by: bobk544
2 Replies

3. Shell Programming and Scripting

options in FIND utility

hi folks, I want to select all files older than 13 days from a specified directory for that i used find /home/amar -name '*.*' -mtime 13 but it gives me all the files from subdirectories also, I dont want that I want files only from /home/amar and not from /home/amar/abc/.. which... (8 Replies)
Discussion started by: amarnath
8 Replies

4. Shell Programming and Scripting

Question on Find Utility

Hi Guys, Do you know how can I find files with modificatioin time less than 30 MINUTES using the find utility? Or if u have any other mechanism to find it using script, I'll appreciate it. Thanks! (5 Replies)
Discussion started by: marlonus999
5 Replies

5. Linux

The dot command-line utility?

Hi, What else is the dot used beside relative filepaths in bash? Is it a shell utility as well? No man entry for dot (.)... (3 Replies)
Discussion started by: varelg
3 Replies

6. Shell Programming and Scripting

DB Access Command Line Utility

To read/write to a DB from Java or Perl, you usually have to install/reference several drivers and write a whole bunch of boilerplate DB access code. I'm curious if someone has written a command line utility for Unix/Linux for simple database access for the major providers, something like: ... (3 Replies)
Discussion started by: furashgf
3 Replies

7. Homework & Coursework Questions

How to invent new command utility

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Develop a utility that will enhance the current file management and organization functions of Linux. You... (3 Replies)
Discussion started by: stephanielana1
3 Replies

8. Homework & Coursework Questions

About menu using dd command utility

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Please help about these script... i dont have a problem in option 1. But when it comes to options 2 and options 3... (2 Replies)
Discussion started by: amneytia1
2 Replies

9. AIX

Help to find isutf8 utility for AIX 6.1

Hello everyone, I need to validate the file format for the UTF-8 standard. I know that "isutf8"utility is a part of "moreutils" pkg, I was able to find this package for the Linux but my environment in the AIX 6.1. I would be greatly appreciate your suggestion to my search. I am not familiar with... (5 Replies)
Discussion started by: Nadya Chipova
5 Replies

10. Shell Programming and Scripting

behavior of find utility's -mtime -7 primary

Can I ask a question not related to original question. I have this below command running on a directory which contains thousands of files. This command runs for 5 minutes. Any files received in folder1 during the execution of command is getting moved, even though that file is just received and it's... (6 Replies)
Discussion started by: Super123
6 Replies
exec(1) 							   User Commands							   exec(1)

NAME
exec, eval, source - shell built-in functions to execute other commands SYNOPSIS
sh exec [argument...] eval [argument...] csh exec command eval argument... source [-h] name ksh *exec [arg...] *eval [arg...] DESCRIPTION
sh The exec command specified by the arguments is executed in place of this shell without creating a new process. Input/output arguments may appear and, if no other arguments are given, cause the shell input/output to be modified. The arguments to the eval built-in are read as input to the shell and the resulting command(s) executed. csh exec executes command in place of the current shell, which terminates. eval reads its arguments as input to the shell and executes the resulting command(s). This is usually used to execute commands generated as the result of command or variable substitution. source reads commands from name. source commands may be nested, but if they are nested too deeply the shell may run out of file descrip- tors. An error in a sourced file at any level terminates all nested source commands. -h Place commands from the file name on the history list without executing them. ksh With the exec built-in, if arg is given, the command specified by the arguments is executed in place of this shell without creating a new process. Input/output arguments may appear and affect the current process. If no arguments are given the effect of this command is to mod- ify file descriptors as prescribed by the input/output redirection list. In this case, any file descriptor numbers greater than 2 that are opened with this mechanism are closed when invoking another program. The arguments to eval are read as input to the shell and the resulting command(s) executed. On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways: 1. Variable assignment lists preceding the command remain in effect when the command completes. 2. I/O redirections are processed after variable assignments. 3. Errors cause a script that contains them to abort. 4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari- able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not performed. EXIT STATUS
For ksh: If command is not found, the exit status is 127. If command is found, but is not an executable utility, the exit status is 126. If a redi- rection error occurs, the shell exits with a value in the range 1-125. Otherwise, exec returns a zero exit status. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
csh(1), ksh(1), sh(1), attributes(5) SunOS 5.10 17 Jul 2002 exec(1)
All times are GMT -4. The time now is 10:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy