How to make a file whose name contains every printable character in bash? -
I have a little weird problem, I am moving on the NFS file system, it seems that all the hyphens have been translated into large has gone. For example "a-b" "a: b" and "a -b" becomes "a :: b" I would like to test what else he can translate.
There is a way to create a file whose name is every ASCII printable character and see what it is. How can this be done in Bash?
This is an attempt on a pure bit solution:
For name = ((Chernum = 1; chernum <256; Chen ++)); Do printf -v char_oct_esc '% 3o' "$ churnum" printf -v char "\\ $ char_oct_esc" [[char! = / & Amp; $ Char = ~ [[Print:]]]] & amp; Amp; File name = $ char full echo & gt; "$ Filename" \ & amp; Amp; Printf 'was created & lt;% s & gt; \ N '"$ filename" \ || Failed to print & lt; & Lt; $ Filename & gt; & Gt; \ N '"$ filename"
See excellent information about converting between letters and numbers in bash.
Comments
Post a Comment