HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Execute command in AWK and integrate with POSIX sh...
Operating System - HP-UX
1834406
Members
1359
Online
110067
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
04-24-2003 12:32 AM
04-24-2003 12:32 AM
Execute command in AWK and integrate with POSIX shell
Hi,
I want to perform a backup automatically when the log files are full in informix.
Have though of an endless loop as follows:
while true
do
onstat -l | grep "U--" | awk '{if (NR==[number of table] [execute backup]}'.
done
The [execute backup] is a script using ontape command which already available.
Appreciate any advice on how to call the backup script within AWK or a better way to do it.
Thanks in advance,
YC
I want to perform a backup automatically when the log files are full in informix.
Have though of an endless loop as follows:
while true
do
onstat -l | grep "U--" | awk '{if (NR==[number of table] [execute backup]}'.
done
The [execute backup] is a script using ontape command which already available.
Appreciate any advice on how to call the backup script within AWK or a better way to do it.
Thanks in advance,
YC
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2003 12:59 AM
04-24-2003 12:59 AM
Re: Execute command in AWK and integrate with POSIX shell
We need a little sample of data.
The sintax for executing inside awl is system
i.e.
while true
do
onstat -l | grep "U--" | awk '{if (NR==[number of table]) commd="echo " $1 ; system(commd) }'.
sleep 300
done
The sintax for executing inside awl is system
i.e.
while true
do
onstat -l | grep "U--" | awk '{if (NR==[number of table]) commd="echo " $1 ; system(commd) }'.
sleep 300
done
unsupported
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2003 02:31 AM
04-24-2003 02:31 AM
Re: Execute command in AWK and integrate with POSIX shell
Hi:
Since you appear to be using 'awk' only to count the number of records, you could (simply) do:
...
onstat -l | grep "U--" | [`wc -l` = $N] && echo "ok"
...
Regards!
...JRF...
Since you appear to be using 'awk' only to count the number of records, you could (simply) do:
...
onstat -l | grep "U--" | [`wc -l` = $N] && echo "ok"
...
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2003 05:30 AM
04-24-2003 05:30 AM
Re: Execute command in AWK and integrate with POSIX shell
Leong,
I don't know what's the reason caputring the Log file and then issuing ontape command.
If you just issue ontape -a command it will copy all full logical logs automatically.
Thanks
Zafar
I don't know what's the reason caputring the Log file and then issuing ontape command.
If you just issue ontape -a command it will copy all full logical logs automatically.
Thanks
Zafar
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP