This is more a bash question than a jenkins one and you have multiple ways to do it.
If all your files are in a single path, and actually you are forcing with the depth, you can use a cut
for path in $(/usr/bin/find dist/renew-online -maxdepth 1 -name "*.js" -or -name "*.css" -type f | cut -d'/' -f2); do
In the other hand the here https://serverfault.com/questions/354403/remove-path-from-find-command-output by the usage of -printf '%f
'
Please note as well that the usage of find in a for loop
is fragile and it is recommended to use a while
https://github.com/koalaman/shellcheck/wiki/SC2044
EDIT
the field used in cut depends on the folders you have in your find syntax. The most accurate way is the one in the serverfault link above
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…