The problem with cut is that it's really picky. You could get close with:
ls -alh | cut -f11 -d' ' but due to various file sizes sometimes you'll get the wrong field due to extra spaces. So you'd end up running something else to delete the extra spaces first. For your specific problem you could do this: ls -alh | tr -s ' ' | cut -f9 -d' ' Oh by the way, is etiquette here to reply all or reply list? Chris Berry Linux Systems Administrator Davis Tool x521 >>> Rich Shepard <[email protected]> 6/11/2012 8:23 AM >>> On Mon, 11 Jun 2012, Chris Berry wrote: > I would generally use awk to do that, something like this: > ls -alh | awk '{print $9 }' Chris, I thought of that but figured cut would be the better way. Apparenly not. Thanks, Rich _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
