<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Removing the first Charater in a text file in Operating System - Tru64 Unix</title>
    <link>https://community.hpe.com/t5/operating-system-tru64-unix/removing-the-first-charater-in-a-text-file/m-p/3109980#M3733</link>
    <description>I have a strange thing I want to do.&lt;BR /&gt;In our Apps when it greneates a text file for the printer it inserts a formfeed (Control L I think) causing an leading blank page on all our printers. If I turn off the Formfeed in the Apps then there is no page break at all and this is messy.&lt;BR /&gt;Here is what I want to do and need a little help.&lt;BR /&gt;The Apps has a Printer filter script that adds the the printer controls (like -onp, -o compress, etc). In here is could add a shortscript that removes the first charater if it is a formfeed.&lt;BR /&gt;My question is what is an easy way to remove just the first charater?&lt;BR /&gt;Must be an easy way to do this.&lt;BR /&gt;Marty</description>
    <pubDate>Tue, 04 Nov 2003 11:07:09 GMT</pubDate>
    <dc:creator>Marty Metras</dc:creator>
    <dc:date>2003-11-04T11:07:09Z</dc:date>
    <item>
      <title>Removing the first Charater in a text file</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/removing-the-first-charater-in-a-text-file/m-p/3109980#M3733</link>
      <description>I have a strange thing I want to do.&lt;BR /&gt;In our Apps when it greneates a text file for the printer it inserts a formfeed (Control L I think) causing an leading blank page on all our printers. If I turn off the Formfeed in the Apps then there is no page break at all and this is messy.&lt;BR /&gt;Here is what I want to do and need a little help.&lt;BR /&gt;The Apps has a Printer filter script that adds the the printer controls (like -onp, -o compress, etc). In here is could add a shortscript that removes the first charater if it is a formfeed.&lt;BR /&gt;My question is what is an easy way to remove just the first charater?&lt;BR /&gt;Must be an easy way to do this.&lt;BR /&gt;Marty</description>
      <pubDate>Tue, 04 Nov 2003 11:07:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/removing-the-first-charater-in-a-text-file/m-p/3109980#M3733</guid>
      <dc:creator>Marty Metras</dc:creator>
      <dc:date>2003-11-04T11:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Removing the first Charater in a text file</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/removing-the-first-charater-in-a-text-file/m-p/3109981#M3734</link>
      <description>how about something like this&lt;BR /&gt; &lt;BR /&gt;#!/bin/sh &lt;BR /&gt;read a&lt;BR /&gt;a=`expr "$a" : ".\(.*\)"`&lt;BR /&gt;echo $a&lt;BR /&gt;while read a&lt;BR /&gt;do&lt;BR /&gt;echo $a&lt;BR /&gt;done&lt;BR /&gt; &lt;BR /&gt;then run by piping your file into this script.&lt;BR /&gt;Probably prettier ways than this but this is first thing that came to mind.&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Nov 2003 11:17:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/removing-the-first-charater-in-a-text-file/m-p/3109981#M3734</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-11-04T11:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Removing the first Charater in a text file</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/removing-the-first-charater-in-a-text-file/m-p/3109982#M3735</link>
      <description>Hi Marty,&lt;BR /&gt;&lt;BR /&gt;the following c programme you can also use as filter, if you have only this app printing, otherwise use command &amp;lt; textfile.&lt;BR /&gt;It filter a form feed/line feed in the first line.&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;&lt;BR /&gt;#include "stdio.h"&lt;BR /&gt;&lt;BR /&gt;void main(void)&lt;BR /&gt;{&lt;BR /&gt;  ushort c;&lt;BR /&gt;  ushort d;&lt;BR /&gt;&lt;BR /&gt;  d = 1;&lt;BR /&gt;  while(!feof(stdin))&lt;BR /&gt;  {&lt;BR /&gt;    c = getchar();&lt;BR /&gt;    if (d == 1)&lt;BR /&gt;    {&lt;BR /&gt;      if (c == 12)&lt;BR /&gt;      { &lt;BR /&gt;        c = getchar();&lt;BR /&gt;        if (c == 10)&lt;BR /&gt;        {&lt;BR /&gt;          d = 0;&lt;BR /&gt;          c = getchar();&lt;BR /&gt;        }&lt;BR /&gt;      }&lt;BR /&gt;    }&lt;BR /&gt;    putchar(c);&lt;BR /&gt;    d = 0;&lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Nov 2003 12:36:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/removing-the-first-charater-in-a-text-file/m-p/3109982#M3735</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2003-11-04T12:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Removing the first Charater in a text file</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/removing-the-first-charater-in-a-text-file/m-p/3109983#M3736</link>
      <description>Thanks guys.&lt;BR /&gt;I got it working.&lt;BR /&gt;&lt;BR /&gt;Thanks for the help.&lt;BR /&gt;Marty</description>
      <pubDate>Tue, 04 Nov 2003 14:49:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/removing-the-first-charater-in-a-text-file/m-p/3109983#M3736</guid>
      <dc:creator>Marty Metras</dc:creator>
      <dc:date>2003-11-04T14:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Removing the first Charater in a text file</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/removing-the-first-charater-in-a-text-file/m-p/3109984#M3737</link>
      <description>Marty,&lt;BR /&gt;&lt;BR /&gt; Here's the way we do it... (for reference), then we pipe it into the print filter ...&lt;BR /&gt;&lt;BR /&gt;  sed -e "1 s/^L//g;\$ s/^L//g" ${file}&lt;BR /&gt;&lt;BR /&gt; Gary</description>
      <pubDate>Wed, 05 Nov 2003 03:49:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/removing-the-first-charater-in-a-text-file/m-p/3109984#M3737</guid>
      <dc:creator>Gary Hansford</dc:creator>
      <dc:date>2003-11-05T03:49:45Z</dc:date>
    </item>
  </channel>
</rss>

