Skip to main content
added 5 characters in body
Source Link

You won't find -prinf in many find implementations. For those cases you can achieve the same by using the -exec command.

find "/some/dir" -exec echo -n {}"|" \;

echo prints every dir entry

The -n modifier avoids printing a new line character

The "|" character is appended after every entry

If your echo implementation does not support the -n flag, simple:

find "/some/dir" -exec printf "%s" {}"|" \;

The above will work in virtually any bash shell, including busybox which is present in minimalistic firmware oriented distros like OpenWRT or VMWare ESXi.

(*) Please, note that the printf call in the last example is external to find and not a find option as is posed in the first answer. printf as a binary is present in almost any distro you can think of, even the smallest ones.

You won't find -prinf in many find implementations. For those cases you can achieve the same by using the -exec command.

find "/some/dir" -exec echo -n {}"|" \;

echo prints every dir entry

The -n modifier avoids printing a new line character

The "|" character is appended after every entry

If your echo implementation does not support the -n flag, simple:

find "/some/dir" -exec printf {}"|" \;

The above will work in virtually any bash shell, including busybox which is present in minimalistic firmware oriented distros like OpenWRT or VMWare ESXi.

(*) Please, note that the printf call in the last example is external to find and not a find option as is posed in the first answer. printf as a binary is present in almost any distro you can think of, even the smallest ones.

You won't find -prinf in many find implementations. For those cases you can achieve the same by using the -exec command.

find "/some/dir" -exec echo -n {}"|" \;

echo prints every dir entry

The -n modifier avoids printing a new line character

The "|" character is appended after every entry

If your echo implementation does not support the -n flag, simple:

find "/some/dir" -exec printf "%s" {}"|" \;

The above will work in virtually any bash shell, including busybox which is present in minimalistic firmware oriented distros like OpenWRT or VMWare ESXi.

(*) Please, note that the printf call in the last example is external to find and not a find option as is posed in the first answer. printf as a binary is present in almost any distro you can think of, even the smallest ones.

added 257 characters in body
Source Link

You won't find -prinf in many find implementations. For those cases you can achieve the same by using the -exec command.

find "/some/dir" -exec echo -n {}"|" \;

echo prints every dir entry

The -n modifier avoids printing a new line character

The "|" character is appended after every entry

If your echo implementation does not support the -n flag, simple:

find "/some/dir" -exec printf {}"|" \;

The above will work in virtually any bash shell, including busybox which is present in minimalistic firmware oriented distros like OpenWRT or VMWare ESXi.

(*) Please, note that the printf call in the last example is external to find and not a find option as is posed in the first answer. printf as a binary is present in almost any distro you can think of, even the smallest ones.

You won't find -prinf in many find implementations. For those cases you can achieve the same by using the -exec command.

find "/some/dir" -exec echo -n {}"|" \;

echo prints every dir entry

The -n modifier avoids printing a new line character

The "|" character is appended after every entry

You won't find -prinf in many find implementations. For those cases you can achieve the same by using the -exec command.

find "/some/dir" -exec echo -n {}"|" \;

echo prints every dir entry

The -n modifier avoids printing a new line character

The "|" character is appended after every entry

If your echo implementation does not support the -n flag, simple:

find "/some/dir" -exec printf {}"|" \;

The above will work in virtually any bash shell, including busybox which is present in minimalistic firmware oriented distros like OpenWRT or VMWare ESXi.

(*) Please, note that the printf call in the last example is external to find and not a find option as is posed in the first answer. printf as a binary is present in almost any distro you can think of, even the smallest ones.

Source Link

You won't find -prinf in many find implementations. For those cases you can achieve the same by using the -exec command.

find "/some/dir" -exec echo -n {}"|" \;

echo prints every dir entry

The -n modifier avoids printing a new line character

The "|" character is appended after every entry