when I run
find ~/foo/bar/. -mindepth 1 -maxdepth 1 -type d
I get an output of all subdirectories of the given path. e.g.
/home/user/foo/bar/a /home/user/foo/bar/b ... /home/user/foo/bar/abcd
Now I want to use that output as a string so I added
find ~/foo/bar/. -mindepth 1 -maxdepth 1 -type d -print | xargs sed 's#/home/user/foo/bar/#some_text"#g'
but the result wasn't as expected
sed: read error on /home/user/foo/bar/./abc: Is a directory
obviously sed doesn't treat the piped arguments as strings my intnended e.g.
some_text/a some_text/b ... some_text/abcd