Sponsored Content
Top Forums Shell Programming and Scripting Find "*.c" and "Makefile" and then delete them with one line Post 302908148 by yanglei_fage on Friday 4th of July 2014 03:19:20 AM
Old 07-04-2014
Find "*.c" and "Makefile" and then delete them with one line

find "*.c" and "Makefile" and then delete them with one line
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. Shell Programming and Scripting

Delete files older than "x" if directory size is greater than "y"

I wrote a script to delete files which are older than "x" days, if the size of the directory is greater than "y" #!/bin/bash du -hs $1 while read SIZE ENTRY do if ; then find $1 -mtime +$2 -exec rm -f {} \; echo "Files older than $2 days deleted" else echo "free Space available"... (4 Replies)
Discussion started by: JamesCarter
4 Replies

3. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

4. Shell Programming and Scripting

Find lines with "A" then change "E" to "X" same line

I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
Discussion started by: nightwatchrenba
10 Replies

5. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

6. Shell Programming and Scripting

Delete all log files older than 10 day and whose first string of the first line is "MSH" or "<?xml"

Dear Ladies & Gents, I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out: for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies

7. Shell Programming and Scripting

find . -path "*_nobackup*" -prune -iname "*.PDF" \( ! -name "*_nobackup.*" \)

These three finds worked as expected: $ find . -iname "*.PDF" $ find . -iname "*.PDF" \( ! -name "*_nobackup.*" \) $ find . -path "*_nobackup*" -prune -iname "*.PDF" They all returned the match: ./folder/file.pdf :b: This find returned no matches: $ find . -path "*_nobackup*" -prune... (3 Replies)
Discussion started by: wolfv
3 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

9. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies
Module::Package::Plugin(3pm)				User Contributed Perl Documentation			      Module::Package::Plugin(3pm)

SYNOPSIS
package Module::Package::Name; package Module::Package::Name::flavor; use Moo; extends 'Module::Package::Plugin'; sub main { my ($self) = @_; $self->mi->some_module_install_author_plugin; $self->mi->other_author_plugin; } 1; DESCRIPTION
This module is the base class for Module::Package plugins. EXAMPLE
Take a look at the Module::Package::Ingy module, for a decent starting point example. That plugin module is actually used to package Module::Package itself. API
To create a Module::Package plugin you need to subclass Module::Package::Plugin and override the "main" method, and possibly other things. This section describes how that works. Makefile.PL processing happens in the following order: - 'use inc::Module::Package...' is invoked - $plugin->initial is called - BEGIN blocks in Makefile.PL are run - $plugin->main is called - The body of Makefile.PL is run - $plugin->final is called initial This method is call during the processing of 'use inc::Module::Package'. You probably don't need to subclass it. If you do you probably want to call the SUPER method. It runs the deps_list, if any and guesses the primary modules file path. main This is the method you must override. Do all the things you want. You can call "all_from", if you need to get sequencing right, otherwise it gets called by final(). Don't call "WriteAll", it get's called automatically in final(). final This does all the things after the entire Makefile.PL body has run. You probably don't need to override it. OPTIONS
The following options are available for use from the Makefile.PL: use Module::Package 'Foo:bar', deps_list => 0|1, install_bin => 0|1, install_share => 0|1, manifest_skip => 0|1, requires_from => 0|1; These options can be used by any subclass of this module. deps_list Default is 1. This option tells Module::Package to generate a "author_requires" deps list, when you run the Makefile.PL. This list will go in the file "pkg/deps_list.pl" if that exists, or after a '__END__' statement in your Makefile.PL. If neither is available, a reminder will be warned (only when the author runs it). This list is important if you want people to be able to collaborate on your modules easily. install_bin Default is 1. All files in a "bin/" directory will be installed. It will call the "install_script" plugin for you. Set this option to 0 to disable it. install_share Default is 1. All files in a "share/" directory will be installed. It will call the "install_share" plugin for you. Set this option to 0 to disable it. manifest_skip Default is 1. This option will generate a sane MANIFEST.SKIP for you and delete it again when you run "make clean". You can add your own skips in the file called "pkg/manifest.skip". You almost certainly want this option on. Set to 0 if you are weird. requires_from Default is 1. This option will attempt to find all the requirements from the primary module. If you make any of your own requires or requires_from calls, this option will do nothing. perl v5.14.2 2011-10-06 Module::Package::Plugin(3pm)
All times are GMT -4. The time now is 10:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy