Convert first letter of given file to lower case

bash, linux, shell

Solution

You can do that with `sed`:

sed -e 's/./\L&/' Shell.txt

(Probably safer to do

sed -e 's/^./\L&\E/' Shell.txt

if you ever want to extend this.)

Problem

I want to convert the 1st letter of each line to lower case up to the end of the file. How can I do this using shell scripting? I tried this: ``` plat=`echo $plat |cut -c1 |tr [:upper:] [:lower:]``echo $plat |cut -c2-` ``` but this converts only the first character to lower case. My file looks like this: ``` Apple Orange Grape ``` Expected result: ``` apple orange grape ```

Original source