The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Can i read a file character by character
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Directory
Register
Forum Rules
FAQ
Contribute
Members List
Search
Today's Posts
Mark Forums Read
Thread
:
Can i read a file character by character
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
11-21-2007
LivinFree
Goober Extraordinaire
Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
What shell? Bash has the `read` builtin where you can do:
Code:
while read -n1 char; do #do something with the byte in $char done <input.file
LivinFree
View Public Profile
Find all posts by LivinFree