C#, 406342 bytes
- takes file list from passed arguments.
- read every char in every file than only converts to lower case if and only if the character in the A..Z range than send it to STDOUT.
- If there is no file list than reads STDIN, reads every char, converts to lower case if and only if the character in the A..Z range than send it to STDOUT.
usingnamespace System;System{ using System.IO; using System.Linq; class P{ static void Main(string[] astring[]a){ Action<char> e= C=>Action<char>e=C=>{var c= charc=char.ToLower(C); Console;Console.Out.Write(c>='a'&& c<='z' c>='a'&&c<='z'?c:C); }; if(a.Length>0) a.ToList().ForEach(f=>File.ReadAllText(f).ToCharArray().ToList().ForEach(e)); else while(true) Console.In.ReadLine().ToCharArray().ToList().ForEach(e); } } } C#, 328319 bytes
single-liner, same as above:
using System;usingnamespace System.{using IO;using System.Linq;class P{static void Main(string[]a){Action<char>e=C=>{var c=char.ToLower(C);Console.Out.Write(c>='a'&&c<='z'?c:C);};if(a.Length>0)a.ToList().ForEach(f=>File.ReadAllText(f).ToCharArray().ToList().ForEach(e));else while(true)Console.In.ReadLine().ToCharArray().ToList().ForEach(e);}}}