- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Awk script problem
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2000 06:08 AM
10-03-2000 06:08 AM
I run an awk command in a script named script + error.txt attached. When it reaches 54 lines in the output file, it gives me the error seen in script + error.txt which is attached. Is there a way to resolve this or do you know why it happens so that I can look to work round it?
Regards
Stephen
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2000 06:13 AM
10-03-2000 06:13 AM
Re: Awk script problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2000 06:16 AM
10-03-2000 06:16 AM
Re: Awk script problem
You need to ensure that awk is closing the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2000 06:20 AM
10-03-2000 06:20 AM
Re: Awk script problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2000 06:39 AM
10-03-2000 06:39 AM
Re: Awk script problem
It appears that the objective is to copy files based on some criteria. May I suggest that instead of using the system call feature of awk, that you simply build copy commands as output of the awk script. That is, the total script might start by building a script "preamble"; append the copy command with the awk process to the running script file, and then execute the dynamically constructed script.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2000 07:02 AM
10-03-2000 07:02 AM
Re: Awk script problem
cat $WORK/acc_reformat |
while read ARG1 ARG2 ARG3 ARG4
do
FILE=$(ls -l /u/odexcc/FTP/$ARG3 |grep "$ARG4" | grep "$ARG2" |cut -c59-73)
echo /u/odexcc/FTP/$ARG3/$FILE >> $WORK/files.out
cp /u/odexcc/FTP/$ARG3/$FILE /u/stephen/shell/recon/ftp_files
done
This could be made much more efficient if you supplied more details of what you are trying to achieve.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2000 11:49 PM