🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Sandra Perrigo Fri, 24 Sep 1999 00:00
awk problem
#158
Author: Sandra Perrigo
Date: Fri, 24 Sep 1999 00:00
24 lines
1789 bytes
Hi, sorry for my ignorance but I have not done any UNIX for 2 and a half
years and I am trying this from memory (with a few annoying glances through
an awk manual). I am trying to write a simple script which will check files
of a certain type from one directory and make sure they do not exist in a
control file. I have tried a contrived awk piped into a grep after
redirecting the output of an ls command into a temp file ie

ls *.AMD > $HOME/temp
awk -F '{ print $1 }' $HOME/temp | grep -i $HOME/loadctrl | echo $? >>
errtrp

The errtrp file is created earlier in the script. I was then going to grep
the errtrp for the existence of 1 to check that the files from the listing
did not exist in the control file. I am sure one of you guys with a brain
the size of a small planet can instantly see what I am doing wrong here and
hopefully suggest a solution (it just hangs after writing first return code
to errtrp file). I would imagine there is a much easier way to do this but I
am just too rusty to even remember more than about ten commands. It is
something I have to do at work and I may never have any more UNIX
involvement in the future (which means I don't really want to RTFM if I can
avoid it).

Thanks for your time
Dylan.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads