[SOLVED] script showing control sequences in list of filenames
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Just so we are on the same page, you are running this on some form of linux and the shell is either bash or sh?
Your output seems to be a bit bogus as even if I run the following:
Code:
$ echo | od -c
0000000 \n
0000001
So assuming you get in the loop and the variable has nothing in it, you should at least get the above.
If you are running colucix's code then you are also in a directory where there are no files or directories ending in '.bd'
thanks for the input chaps. Just realised that I may have been wasting your time. I'd assumed it was a linux box (as our boxes are always linux), but this one is apparently solaris, so I guess that might explain it.
Anyway, on the assumption that this is the reason, I'll mark this call as closed.
thanks for the input chaps. Just realised that I may have been wasting your time. I'd assumed it was a linux box (as our boxes are always linux), but this one is apparently solaris, so I guess that might explain it.
Anyway, on the assumption that this is the reason, I'll mark this call as closed.
Thanks again.
I can move the thread to the Solaris/Opensolaris forum. But have you solved the problem? If not, please show us the output of
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
Originally Posted by danishgambit
thanks for the input chaps. Just realised that I may have been wasting your time. I'd assumed it was a linux box (as our boxes are always linux), but this one is apparently solaris, so I guess that might explain it.
There is no reason for Solaris to behave differently than Linux on this issue.
This should just work even with the legacy Solaris bourne shell:
Code:
for file in `ls *.bd`
do
echo "proutil dbname -C load $file" >> $log
done
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.