for loop through files with spaces and some special characters

后端 未结 3 1173
难免孤独
难免孤独 2020-12-22 13:38

I need to run the following command with a for loop

cat Locate\\ Message.eml | ./locatePipe.php

I am trying the following however it seems

3条回答
  •  無奈伤痛
    2020-12-22 14:15

    If you're using bash 4, just skip using find:

    shopt -s globstar
    for i in **/*.eml; do
        cat "$i"
    done | ./locatePipe.php
    

提交回复
热议问题