Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Using "find" and "-exec rm" ... Just no luck :( Post 302349525 by methyl on Tuesday 1st of September 2009 07:17:08 AM
Old 09-01-2009
Hi jlliarge. I cited Sunos 4.1.1 based on a comment I made in an old script, though I no longer have a copy of the O/S. This is not the only time I have come across the problem.

The wikipedia section on "find" mentions "In some shells, the {} must be quoted". I can't argue with that.

find - Wikipedia, the free encyclopedia


The wiki looks pretty accurate bar not mentioning differences between "/pathname" and "/pathname/" in some unixes.


In this comprehensive GNU-based generic man page for find(1) it specifically states to quote '{}' . It also warns about security hole in the POSIX implementation of "find ... -exec" which I did not know about.

http://unixhelp.ed.ac.uk/CGI/man-cgi?find

This independent researcher has gone to town on checking what works in various versions of find. See under "Embedded {}". He describes some quite radical different behaviours of {} which does support my case.

http://www.in-ulm.de/~mascheck/various/find/

Last edited by methyl; 09-01-2009 at 09:06 AM.. Reason: Further example of examples
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

No utpmx entry: you must exec "login" from lowest level "shell"

Hi I have installed solaris 10 on an intel machine. Logged in as root. In CDE, i open terminal session, type login alex (normal user account) and password and i get this message No utpmx entry: you must exec "login" from lowest level "shell" :confused: What i want is: open various... (0 Replies)
Discussion started by: peterpan
0 Replies

2. 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

3. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

4. 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

5. 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

6. 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

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
CGI::Application::Plugin::RequireSSL(3pm)		User Contributed Perl Documentation		 CGI::Application::Plugin::RequireSSL(3pm)

NAME
CGI::Application::Plugin::RequireSSL - Force SSL in specified pages or modules VERSION
Version 0.04 SYNOPSIS
use CGI::Application::Plugin::RequireSSL; sub login_form :RequireSSL { my $self = shift; # etc } DESCRIPTION
CGI::Application::Plugin::RequireSSL allows individual run modes or whole modules to be protected by SSL. If a standard HTTP request is received, you can specify whether an error is raised or if the request should be redirected to the HTTPS equivalent URL. EXPORT
Exported methods: config_requiressl, mode_redirect USAGE
run mode-level protection run mode protection is specified by the RequireSSL attribute after the method name: sub process_login :RequireSSL { my $self = shift; } Module-level protection You can protect a complete module by setting the 'require_ssl' parameter in your instance script: use MyApp; my $webapp = MyApp->new( PARAMS => {require_ssl => 1} ); $webapp->run(); Redirecting to a protected URL. By default, an error is raised if a request is made to a protected run mode or module using HTTP. However, you can specify that the request is redirected to the HTTPS url by setting the rewrite_to_ssl parameter as long as the requested method is not POST: my $webapp = MyApp->new( PARAMS => {rewrite_to_ssl => 1} ); Turning off checks. If you need to turn off checks, simply set the ignore_check parameter when configuring the plugin (see "config_requiressl" below). Reverting to HTTP Once a successful request is made to a protected run mode or module, subsequent requests to a non-protected run mode or module will revert to using HTTP. To prevent this from happening, set the parameter keep_in_ssl in the configuration (see "config_requiressl" below) METHODS
config_requiressl Optionally configure the plugin in your cgiapp_init method $self->config_requiressl( keep_in_ssl => 0, ignore_check => 0, ) Valid parameters are: o keep_in_ssl - if set, all subsequent requests following one to a protected run mode or module will be via HTTPS. o ignore_check - ignore SSL schecking. This is useful if your application is deployed in an environment that doesn't support SSL. mode_redirect This is a run mode that will be automatically called if the request should be redirected to the equivalent HTTP or HTTPS URL. You should not call it directly. AUTHOR
Dan Horne, "<dhorne at cpan.org>" BUGS
Please report any bugs or feature requests to "bug-cgi-application-plugin-requiressl at rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Application-Plugin-RequireSSL <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI- Application-Plugin-RequireSSL>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. CAVEAT
This module been tested under the FastCGI persistent environment, but not under mod_perl. The author would apprecaute feedback from anyone who is able to test with that environment. SUPPORT
You can find documentation for this module with the perldoc command. perldoc CGI::Application::Plugin::RequireSSL You can also look for information at: o AnnoCPAN: Annotated CPAN documentation http://annocpan.org/dist/CGI-Application-Plugin-RequireSSL <http://annocpan.org/dist/CGI-Application-Plugin-RequireSSL> o CPAN Ratings http://cpanratings.perl.org/d/CGI-Application-Plugin-RequireSSL <http://cpanratings.perl.org/d/CGI-Application-Plugin-RequireSSL> o RT: CPAN's request tracker http://rt.cpan.org/NoAuth/Bugs.html?Dist=CGI-Application-Plugin-RequireSSL <http://rt.cpan.org/NoAuth/Bugs.html?Dist=CGI-Application- Plugin-RequireSSL> o Search CPAN http://search.cpan.org/dist/CGI-Application-Plugin-RequireSSL <http://search.cpan.org/dist/CGI-Application-Plugin-RequireSSL> ACKNOWLEDGEMENTS
o Users of the CGI::Application wiki (http://www.cgi-app.org) who requested this module. o Andy Grundman - I stole the idea of the keep_in_ssl parameter from his Catalyst::Plugin::RequireSSL module COPYRIGHT &; LICENSE Copyright 2007 Dan Horne, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2011-11-07 CGI::Application::Plugin::RequireSSL(3pm)
All times are GMT -4. The time now is 05:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy