This should do the same thing, reading from stdin:
#!/bin/sh
IFS='|'
while read file doc folder title; do
test -f $file && capture $file $doc $folder $title
done
- Mark B.
Paul H. Christidis wrote:
> Fellow list members,
>
> Could someone more familiar with Unix, than I am, help me convert the
> following command file segment (Hpstdin is actually another data file with
> a unique set of values in each record).
>
> TIA
>
> Paul Christidis
>
> ...
> ...
> setvar _eof FINFO(hpstdin,"eof") + 1
> while SETVAR(_eof, _eof - 1) <> 0 do
> INPUT _File_Rec
> setvar _File_Name WORD(_File_Rec, "|", 1)
> setvar _Doc_Name WORD(_File_Rec, "|", 2)
> setvar _Folder WORD(_File_Rec, "|", 3)
> setvar _Title WORD(_File_Rec, "|", 4)
> if FINFO(_File_Name, "exists") then
> run capture "!_File_Name;!_Doc_Name;!_Folder;!_Title"
> endif
> endwhile
> ...
> ...
--
[log in to unmask]
Remainder of .sig suppressed to conserve expensive California electrons...
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|