Sponsored Content
Top Forums Shell Programming and Scripting find -exec How to add additional parameter when calling a funtion Post 303004817 by jcdole on Monday 9th of October 2017 04:49:42 PM
Old 10-09-2017
Quote:
Originally Posted by RudiC
Check your quoting... i.e. double quote the entire construct.
I tried different things but no way.

Code:
#find $START_HERE" -exec bash -c 'a_function "$0" {}  $VARIABLE_1  $VARIABLE_2' \; 

#find $START_HERE" -exec bash -c 'a_function {}  $VARIABLE_1  $VARIABLE_2' \; 

#find $START_HERE" -exec bash -c 'a_function ' "$VARIABLE_1" "$VARIABLE_2" _ {} \; 

#find $START_HERE" -exec bash -c 'a_function  "$0" "$VARIABLE_2"  "$VARIABLE_1"'  _ {} \; 

#find $START_HERE" -exec bash -c 'a_function {}  "$VARIABLE_2"  "$VARIABLE_1"' \; 

#find $START_HERE" -exec bash -c 'a_function '  "{} $VARIABLE_2  $VARIABLE_1" \;

#find $START_HERE" -exec bash -c 'a_function  "$VARIABLE_2"  "$VARIABLE_1"'  __ {}  \;

#find $START_HERE" -exec bash -c 'a_function  "$0" '  "{}  $VARIABLE_2  $VARIABLE_1" \;

#find $START_HERE" -exec bash -c 'a_function  '  "{}  $VARIABLE_2  $VARIABLE_1" \;

#find $START_HERE" -exec bash -c 'a_function  '  {}  "$VARIABLE_2"  "$VARIABLE_1"  \;

#find $START_HERE" -exec bash -c 'a_function  '  "$VARIABLE_2"  "$VARIABLE_1"  {}  \;

#find $START_HERE"  -exec bash -c 'a_function  "$0" ' {}  "$VARIABLE_1"   "$VARIABLE_2" \;

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

pass parameter back to calling program

Hi all, I am running AIX version 4. I have a shell script that is calling another script. I want the called script to obtain a value and pass it back to the calling script. So far, I know that to pass a parameter to a called script is as such: sh proc2.sh $1 $2 etc. What I don't know how... (11 Replies)
Discussion started by: jthomas
11 Replies

2. Shell Programming and Scripting

Passing a parameter while calling a script

Hello everyone I was asked to pass a parameter in the calling of a script. IŽll have two parameters London and Birmingham and IŽll need to pass this because each of these will have a specific script however with the same name. /home/script/loaddata.ksh Lond /home/script/loaddata.ksh Birm... (2 Replies)
Discussion started by: Rafael.Buria
2 Replies

3. Shell Programming and Scripting

| with find -exec

can we use |(pipe operator) with find -exec.....? or can pipe the output of find command to another command...? if not, why...? pls explain (3 Replies)
Discussion started by: vijay_0209
3 Replies

4. Shell Programming and Scripting

Add additional numbers to file

I need to change the following field from: "7/3/2009 7:07:12 PM","12345676","ok","8674" "6/3/2009 8:07:12 PM","12345676","ok","8674" "5/1/2009 7:07:12 PM","12345676","ok","8674" "4/9/2009 3:07:12 AM","12345676","ok","8674" "3/8/2009 3:07:12 PM","12345676","ok","8674" "2/7/2009 4:07:12... (10 Replies)
Discussion started by: Pablo_beezo
10 Replies

5. UNIX for Dummies Questions & Answers

Find Exec

Hello All, Is there a way to make exec do a couple of operations on a single input from find? For example, find . -type d -exec ls -l "{}" ";" I would like to give the result of each "ls -l" in the above to a wc. Is that possible? I want to ls -l | wc -l inside... (1 Reply)
Discussion started by: prasanna1157
1 Replies

6. AIX

How to add/remove additional DNS and IP to AIX

Hello, How to add/remove additional DNS and IP to AIX ? I wanted to add 3 more new DNS and IP addresses to existing AIX 5.2. (1 Reply)
Discussion started by: balareddy
1 Replies

7. Shell Programming and Scripting

add a additional column in csv file

Thanks for allwoing me to discuss in this forum GIVEN BELOW A simple shell script which will ask for the user to input a PC name and it will produce the output in CSV with the PC name #! /bin/bash read -p "enter the PC name :" pc #checking for netstat report netstat -pant |sed '1,2d'... (1 Reply)
Discussion started by: ayyappancheta
1 Replies

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

9. Shell Programming and Scripting

find: missing argument to `-exec' while redirecting using find in perl

Hi Friends, Please help me to sort out this problem, I am running this in centos o/s and whenever I run this script I am getting "find: missing argument to `-exec' " but when I run the same code in the command line I didn't find any problem. I am using perl script to run this ... (2 Replies)
Discussion started by: ramkumarselvam
2 Replies

10. AIX

Add additional swap place on AIX server

Can anyone help me the detailed procedure and commands to follow to add additional swap on aix server . My system shows following as of now , #lsattr -E -l sys0 -a realmem realmem 13893632 Amount of usable physical memory in Kbytes False #pstat -s PAGE SPACE: USED PAGES FREE... (7 Replies)
Discussion started by: gull05
7 Replies
PAPS(1) 						      General Commands Manual							   PAPS(1)

NAME
paps - UTF-8 to PostScript converter using Pango SYNOPSIS
paps [options] files... DESCRIPTION
paps reads a UTF-8 encoded file and generates a PostScript language rendering of the file. The rendering is done by creating outline curves through the pango ft2 backend. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. --landscape Landscape output. Default is portrait. --columns=cl Number of columns output. Default is 1. --font=desc Set the font description. Default is Monospace 12. --rtl Do rtl layout. --paper ps Choose paper size. Known paper sizes are legal, letter, a4. Default is A4. --bottom-margin=bm Set bottom margin in postscript points (1/72 inch). Default is 36. --top-margin=tm Set top margin. Default is 36. --left-margin=lm Set left margin. Default is 36. --right-margin=rm Set right margin. Default is 36. --help Show summary of options. --header Draw page header for each page. --markup Interpret the text as pango markup. --encoding=ENCODING Assume the documentation encoding is ENCODING. --lpi Set the lines per inch. This determines the line spacing. --cpi Set the characters per inch. This is an alternative method of specifying the font size. --stretch-chars Indicates that characters should be stretched in the y-direction to fill up their vertical space. This is similar to the texttops behaviour. AUTHOR
paps was written by Dov Grobgeld <dov.grobgeld@gmail.com>. This manual page was written by Lior Kaplan <kaplan@debian.org>, for the Debian project (but may be used by others). April 17, 2006 PAPS(1)
All times are GMT -4. The time now is 07:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy