delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/11/30/21:36:39

From: "Felix Tilley" <ftilley AT localhost DOT localdomain>
Newsgroups: comp.os.msdos.djgpp
Subject: what script
Date: Thu, 30 Nov 2000 19:31:10 -0700
Organization: i.delete.spammers.org
Message-ID: <t2e3bf32h4d81c@corp.supernews.com>
User-Agent: Pan/0.9.2 (Unix)
X-No-Productlinks: Yes
X-Complaints-To: newsabuse AT supernews DOT com
Lines: 37
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Since  SCCS isn't distributed these days, I made up my own what script
using  grep.  It works under linux and djgpp using bash.  But it does not
work unless the program files contain strings of this sort::

char  *whatid_string="\n@(#)  What is this messy id stuff   (c) dummy AT domain DOT com \n";


#!/bin/bash
# This may not work with csh

# Don't even THINK about running this from DOS

#@(#) What 18 OCT 2000
if test $# -eq 0
  then echo "Need file name."
  echo "Usage:  $0 <filename>"
  exit 1
fi

grep -a "@(#)" $1|while read a b
do
# echo $a
  echo $b
done





-- 


|----------------------------------|
|  Felix Tilley                    |
|  Remove Percent Signs for Email  |
|  ftilley@%azstarnet.%%%com       |
|----------------------------------|

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019