Sponsored Content
Top Forums Shell Programming and Scripting find: missing argument to `-exec' while redirecting using find in perl Post 302582620 by Corona688 on Friday 16th of December 2011 02:41:50 PM
Old 12-16-2011
It's probably eating the backslash since perl double-quotes evaluate those. You may need to escape the escaping. You'll probably also need to escape those $ in your awk, since perl evaluates those into variables, and escape the double-quotes i the awk statement, so perl won't mistake them for its own.

I remember writing Perl like that: Line after line after line of nothing but system() and backticks. Eventually I noticed they were starting entire bourne shells just to parse one "mv a b" and was horrified -- by avoiding the shell I'd actually used eight of them consecutively Smilie

Returning much later, I rewrote some of these "perl" scripts as shell, making them much smaller, simpler, and saner.

Code:
$ wc -l dispatch.pl
49 dispatch.pl
$ wc -l dispatch.sh
25 dispatch.sh
$


Last edited by Corona688; 12-16-2011 at 03:48 PM..
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

command find returned bash: /usr/bin/find: Argument list too long

Hello, I create a file touch 1201093003 fichcomp and inside a repertory (which hava a lot of files) I want to list all files created before this file : find *.* \! -maxdepth 1 - newer fichcomp but this command returned bash: /usr/bin/find: Argument list too long but i make a filter all... (1 Reply)
Discussion started by: yacsil
1 Replies

2. UNIX for Advanced & Expert Users

find and exec

Hi, Happy new year. Would you be so kind to explain me what does this instruction : find /rep/app -type l -exec ls -l {} \;> allink.lst Many thanks. (2 Replies)
Discussion started by: big123456
2 Replies

3. UNIX for Dummies Questions & Answers

How to find the last argument in a argument line?

How to find the last argument in a argument line? (4 Replies)
Discussion started by: nehagupta2008
4 Replies

4. Shell Programming and Scripting

find: No match due to find command being argument

I am using csh and getting the error "find: No match." but I cannot figure out why. What I am trying to do is set the find command to a variable and then execute the variable as a command. I ran it through a debugger and it looks like $FIND is getting set but the find command can not actually be... (2 Replies)
Discussion started by: mst3k4l
2 Replies

5. UNIX for Dummies Questions & Answers

"-maxdepth 1" argument for Solaris find. Other way to restrict find in only one directory?

Hi I wish to find only files in dir /srv/container/content/imz06/. It means exclude subfolder /srv/container/content/imz06/archive/ > uname -a SunOS testbox6 5.10 Generic_139555-08 sun4v sparc SUNW,Sun-Blade-T6320Its Solaris default "find" > find /srv/container/content/imz06/* -name... (4 Replies)
Discussion started by: slashdotweenie
4 Replies

6. Ubuntu

Find and EXEC

This is a huge issue. and I need it fixed ASAP. account-system gate-system race_traffic_sensor achievement-system global race_voicepack admin glue-system realdriveby admin-system gps realism-system... (5 Replies)
Discussion started by: austech360
5 Replies

7. Programming

find the missing sequence in hash perl

Dear Perl's Users, Could anyone help me how to solve my problem. I have data with details below. TTY NAME SEQUENCES U-0 UNIX 0 U-1 UNIX 1 U-2 UNIX 2 <-- From 2 jump to 5 U-5 UNIX 5 U-6 UNIX 6 <-- From 6 jump to 20 U-20 ... (2 Replies)
Discussion started by: askari
2 Replies

8. UNIX for Dummies Questions & Answers

find/xargs/*grep: find multi-line empty "try-catch" blocks - eg, missing ; not in a commented block

How can I recursively find all files in a directory and print out the file and first line number of any text blocks that match the below cases? This would seem to involve find, xargs, *grep, regex, etc. In summary, I want to find so-called empty "try-catch blocks" that do not contain code... (0 Replies)
Discussion started by: lifechamp
0 Replies

9. Shell Programming and Scripting

2 exec in find

Guys, I want to find the log files greather than 23 days and i want to perform 2 things here. one is to list the files and second is to gzip the files. hope this can be done using sh -c option. but not sure the exact command. find . -name "*.log" -mtime +23 -exec ls -la {} \; ... (5 Replies)
Discussion started by: AraR87
5 Replies

10. UNIX for Beginners Questions & Answers

Find: missing argument to `-mtime'

this find command works when using manually on the command line -- $ ls -latr file*.log -rw-r--r-- 1 oracle dba 75 Jan 4 05:00 file_2.log -rw-r--r-- 1 oracle dba 75 Jan 4 05:00 file_1.log $ $ find . ! -name -prune -type f -name "file*.log" -daystart -mtime 2 ./file_1.log ./file_2.log $... (8 Replies)
Discussion started by: wtolentino
8 Replies
Module::Build::Platform::MacOS(3)			User Contributed Perl Documentation			 Module::Build::Platform::MacOS(3)

NAME
Module::Build::Platform::MacOS - Builder class for MacOS platforms DESCRIPTION
The sole purpose of this module is to inherit from "Module::Build::Base" and override a few methods. Please see Module::Build for the docs. Overridden Methods new() MacPerl doesn't define $Config{sitelib} or $Config{sitearch} for some reason, but $Config{installsitelib} and $Config{installsitearch} are there. So we copy the install variables to the other location make_executable() On MacOS we set the file type and creator to MacPerl so it will run with a double-click. dispatch() Because there's no easy way to say "./Build test" on MacOS, if dispatch is called with no arguments and no @ARGV a dialog box will pop up asking what action to take and any extra arguments. Default action is "test". ACTION_realclean() Need to unlock the Build program before deleting. AUTHOR
Michael G Schwern <schwern@pobox.com> SEE ALSO
perl(1), Module::Build(3), ExtUtils::MakeMaker(3) perl v5.16.3 2014-06-10 Module::Build::Platform::MacOS(3)
All times are GMT -4. The time now is 01:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy