Hi,
I am stuck on a problem of deleting blank lines from a file and also shifting some lines in the file to the left.
My file is something like below...
-----------------------------------
<blank>
<blank>
<blank>
<blank>
<blank>
<blank>
<blank>
/users/cdc/importfg.com
/users/ciim/ap/com/apg
/users/ciim/ap/com/apglauto.com
/users/ciim/monthend/partsub.com
/users/ciim/monthend/scrpacnt.com
/users/ciim/mrp/com/mrp.com
/users/ciim/mrp/com/mrp.com
/users/ciim/ms/com/ms.com
/users/ciim/ms/com/ms.com
/users/ciim/ms/com/ms.com
/users/ciim/ms/com/ms.com
/users/ciim/ms/com/ms.com
I need to delete the blank lines from the top and move the lines towards left so that the file is uniquely formatted.
PL NOTE that I tried the following sed command to get rid of the blank lines but IT DOES NOT WORK !!.
sed '/./,/^$/!d'
Your help is greatly appreciated.
Thanks
I am stuck on a problem of deleting blank lines from a file and also shifting some lines in the file to the left.
My file is something like below...
-----------------------------------
<blank>
<blank>
<blank>
<blank>
<blank>
<blank>
<blank>
/users/cdc/importfg.com
/users/ciim/ap/com/apg
/users/ciim/ap/com/apglauto.com
/users/ciim/monthend/partsub.com
/users/ciim/monthend/scrpacnt.com
/users/ciim/mrp/com/mrp.com
/users/ciim/mrp/com/mrp.com
/users/ciim/ms/com/ms.com
/users/ciim/ms/com/ms.com
/users/ciim/ms/com/ms.com
/users/ciim/ms/com/ms.com
/users/ciim/ms/com/ms.com
I need to delete the blank lines from the top and move the lines towards left so that the file is uniquely formatted.
PL NOTE that I tried the following sed command to get rid of the blank lines but IT DOES NOT WORK !!.
sed '/./,/^$/!d'
Your help is greatly appreciated.
Thanks