Re: [SLUG] Insert line in a file

From: kwan@digitalhermit.com
Date: Thu Sep 18 2003 - 15:59:27 EDT


> How can I insert a line in a file at line number 20? Simply please. I
> really understand the straight forward explanations. My mind is just
> wired funny I guess. I am using all shell commands to do this file
> manipulation.
>
>
 awk '{print} NR == 20 {printf ("\n");}' infile

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:40:38 EDT