> On Jun 11, 2018, at 7:40 AM, bruce <badouglas@xxxxxxxxx> wrote: > > Hi. > > Running a centos/fed box, and trying to craft a simple shell test to > run a bunch of commands where the command is displayed as well as the > output > > Ie. The following cmd might return 10 (the num of the files if the cmd > is run from the cmdline. > > ls -al /cloud_nfs_parse/austincc*__parse.dat | wc -l > 10 > > However I can't seem to figure out how to run the cmd from within a > shell script where I can display the "cmd" as well as the result. > > #!/bin/sh > > ## > #cp.sh > # > # run as a test from the nfs /cloud_nfs_parse to gen the num of parse.dat files > # from the bn crawl > # > # > > #-- this doesn't quite work.. as it generates the complete "ls... > output" but it does display the cmd and the resulting num of the ls > files.. > (set -x; ls -al /cloud_nfs_parse/austincc*__parse.dat | wc -l ) > exit > > > Thoughts/comments?? It might help if you would let us know exactly what output you are seeing. Bev in TX _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx/message/2GVZZRTARDBAZVVHAKKXM7MHUCONIURQ/