Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

find and execute a command

multiple_cmd() { 
    tail -n1 $1; 
    ls $1 
}; 
export -f multiple_cmd; 
find *.txt -exec bash -c 'multiple_cmd "$0"' {} ;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #execute #command
ADD COMMENT
Topic
Name
3+4 =