The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Maintain full path of a script in a var when sourcing it from a different script mrbluegreen Shell Programming and Scripting 4 03-19-2008 10:31 PM
help me in sending parameters from sqlplus script to unix shell script Hara Shell Programming and Scripting 2 01-29-2008 03:31 PM
Shell Script: want to insert values in database when update script runs ring Shell Programming and Scripting 1 10-25-2007 04:06 AM
check in unix shell script so that no one is able to run the script manually adi_bang76 Shell Programming and Scripting 1 11-16-2006 10:43 AM
Event firing Nadeem Mistry High Level Programming 1 08-24-2001 12:46 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-05-2007
goodmis goodmis is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 24
Awk Script Is Not Firing

Why is my awk script not firing and how can I confirm?

#!/usr/bin/ksh
# LU 5 FEB 2007 12:35
OLDDATE=`cat TIMEFILE`

for FILE in `find /home/Upload -prune -type f -newer TIMEFILE`
do
gawk -f convert_sun.awk "/home/Upload/$FILE"
done
date > TIMEFILE
  #2 (permalink)  
Old 02-05-2007
sb008 sb008 is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 384
for FILE in `find /home/Upload/* -prune -type f -newer TIMEFILE
  #3 (permalink)  
Old 02-05-2007
goodmis goodmis is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 24
Got An Error

SB008,

I am not seeing the file. I have 1 test file but it is not showing up.

I have tried to echo it.
  #4 (permalink)  
Old 02-05-2007
goodmis goodmis is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 24
SB008

This is the error that I am getting.

Awk will not print FILENAME

convert_sun.awk:11: fatal: cannot open file `/home/Upload//home/Upload/s_test.txt' for reading (No such file or directory)
  #5 (permalink)  
Old 02-05-2007
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,245

Code:
#!/usr/bin/ksh
# LU  5 FEB 2007  12:35
OLDDATE=`cat TIMEFILE`

for FILE in `find /home/Upload/* -prune -type f -newer TIMEFILE`
do
   gawk -f convert_sun.awk "$FILE" 
done
date > TIMEFILE

  #6 (permalink)  
Old 02-05-2007
goodmis goodmis is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 24
Thanks reborg

I finally got the message.

The file path was being repeated.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:04 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0