Read null character seperated fields from a file

read -d ""
Handle any bad named file which contains ",',\n,\b,\t,` etc Store the file name as null character separated list find . -print0 >name.lst and retrieve it using read -r -d "" Eg: find . -print0 >name.lst; cat name.lst| while IFS="" read -r -d "" file; do ls -l "$file"; done
Sample Output
-rw-r--r-- 1 totti root     1 2011-10-25 23:13 a
-rw-r--r-- 1 totti root     1 2011-10-25 23:59 a?b
drwxr-xr-x 2 totti root  4096 2011-10-25 23:00 a?b?c
-rw-r--r-- 1 totti root     1 2011-10-26 00:05 a?
-rw-r--r-- 1 totti root     6 2011-10-25 23:09 a.t
drwxr-xr-x 2 totti root  4096 2011-10-26 00:11 h"i

What Others Think

Come for another class where you start reading about null character both are seperated fields from a file. I know now i have not more time to define you everything same like to take top dissertation writing services from all defined data. To take and to show things always perfect for all time.
nenavok836 · 46 weeks and 6 days ago
Hey there bosom friends! We will satisfy, my name is David Fish, as well as I am the head of a significant IT company, which I created independently from scratch. There is a category of individuals who believe that if the first time that does not function, you need to instantly surrender, and also blame the whole globe for their failures. He was a participant in the project, a startup
Zexass · 41 weeks and 6 days ago
I intend to tell you a brand-new tale today! I have great information for you! Today I introduced my next startup, and also it is acquiring momentum, every person that comes to me will get a fantastic perk. You can always have a great and remarkable experience. Currently you can generate income just from house and also this is our 21st century, you do not require to go to manufacturing facilities for a penny, however simply begin living a brand-new life today. My project
WilburnHart · 21 weeks and 6 days ago
My project
WilburnHart · 21 weeks and 6 days ago
People most likely to work to earn money, however it commonly occurs that they are insufficient also for everyday demands, then people request fundings and also find themselves in a lot more hard economic circumstance. After all, the cash was spent, and also the revenue could not have turned out what to do in such a situation? Probably you need to come to be familiar with exactly how people make money as well as do it very efficiently. You can get acquainted with our way of earning money at LeoVegas Casino Review
LucaHarris · 10 weeks and 6 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: