the result of the expansion is the value of parameter with the shortest matching pattern (the ‘%’ case) or the longest matching pattern (the ‘%%’ case) deleted. *.png -exec basename " doneįrom the man page of the Shell Parameter Expansion Įven the find command not piped with the option -exec will work: find. If you want to do this recursively, you could use GNU find with a -regex test and posix-egrep. It is not safe to parse (and to pipe) the output of ls or find, mainly because it possible to find in the file names non usual characters as the newline, the tab. You could add another if test with -f if you only want regular files and not directories. It is not safe to parse ls or to pipe find
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |