Quoting george@georgetoft.com: > -To print one line of text: > sed -n "${INDEX}p" filename > (where INDEX is the line # or numbers) > > George Toft Thats a great one! I'm always amazed what can be done using head, tail, grep , sed and awk. I tried your example and couldnt get it to work, how do you specify INDEX? I tried sed -n "${22}p" filename (listed whole file) sed -n "${cat testfile}p" filename (bad substitution) sed -n "${22,23,24}p" filename (bad substitution) sed -n "${22 23 24}p" filename (bad substitution) This works: sed -n "22p" filename JD > > > > Is there a command line argument that lets you grab a particular line from > > from a text file in Linux or Unix? > > > > Thanks, > > > > Ben > > -- JD Austin Twin Geckos Technology Services LLC email: jd@twingeckos.com http://www.twingeckos.com phone/fax: 480.344.2640 --------------------------------------------------- PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us To subscribe, unsubscribe, or to change you mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss