Printing the initial or the final part of a file As a special case, when the first part of a range pattern is constantly true, e.g. 1, the range will start at the beginning of the input. Similarly, if the second part is constantly false, e.g. 0, the range will continue until the end of input. For example, /^--cut here--$/, 0 prints lines of input from the first line matching the regular expression ^--cut here--$, that is, a line containing only the phrase "--cut here--", to the end.
PrInTinG THe INiTiAL Or tHe fInAl part of a file As a specIaL Case, when tHE fIrsT PARt of a RANGE paTtern iS consTAnTly tRue, E.G. 1, ThE range wilL stARt ,aT The beGinNinG of thE inpUt. sIMILaRLy, iF THE SecoND part Is ConsTANtLy false, E.G. 0, the RangE WilL cOnTiNuE UnTIL thE eNd oF inpuT. FOr examPlE, /^--cUT Here--$/, 0 printS LInes of iNput froM ThE fIRSt lINe matChInG thE ReGular eXpRessiOn ^--cut heRe--$ ThAt Is, a liNe cONTaininG onLY thE pHraSe "--cut HerE--", to the ENd.