Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    tar -xf example.tar -C temp-dir && mv temp-dir/* $(echo temp-dir/* | sed -r 's,.*/([^/]+)-[0-9.]+,./\1,')


Yeah, exactly the kind of command-line that I would like to avoid ;)


Among other things, it's a shame that there's no dedicated standard-ish CLI tool for manipulating pathnames.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: