Sponsored Content
Top Forums UNIX for Beginners Questions & Answers awk program date function no longer running Post 303043827 by Scrutinizer on Friday 7th of February 2020 04:23:12 PM
Old 02-07-2020
Quote:
Originally Posted by paulgdavitt
Thanks so much! That fixed it. This will really make me look like I know what I'm doing come Tuesday when the report is used. Smilie
Good to hear the suggestion seems to work out for you Smilie
Let me explain what it means:
Code:
while ( ytd_date !~ /^[01][0-9][0-3][0-9][901][0-9]$/ ) {

This is a so-called "regular expression" , which means that the number must contain 6 digits (each bracket pair represents a digit), where the
first one ([01]) may be 0 or 1,
the second ( [0-9]) between 0 and 9
the 3rd between 0 and 3 and
...
the 5th number ([901]) 9, 0 or 1.
..

So the modification changes ([901] to [0-9]) so that the 5th number may be between 0 and 9 inclusively.

Last edited by Scrutinizer; 02-08-2020 at 03:01 AM..
This User Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

scripts no longer running (solaris 8)

hello: I am a somewhat experienced unix user, but brand new to this forum. I am encountering a strange new problem. I have a shell script called foo.ksh it has been running for years (literally) on my Sun (Solaris 8) machine. Recently we put a version of samba on this machine to... (3 Replies)
Discussion started by: smcadoo
3 Replies

2. Shell Programming and Scripting

putting ftp in korn function - no longer working

This works if it's not in a function. I pulled it into one and I get syntax error, no mathcing '<'. I have to call it several times and need it to be a function. Any ideas? function FTP_Engine_File { ftp -inv ${FTP_SERVER} << EOF_FTP >> ${FTP_LOG} user ${FTP_USER} ${FTP_PSWD} ... (4 Replies)
Discussion started by: brdholman
4 Replies

3. Shell Programming and Scripting

program name and function name builtins

Hi Is there a way to get the program/script name or function name usng built ins. Like in many languages arg holds the program name regards (2 Replies)
Discussion started by: xiamin
2 Replies

4. Shell Programming and Scripting

AWK input can not be longer than 3000 bytes

Hi, i have following line in my code. eport.pl < $4 | dos2ux | head -2000 | paste -sd\| - | awk -v S="$1" ' Issue is, i get a message saying "awk:input line | found /file/path cannot be longer than 3000 bytes." "source line number is 3" Can someone help me with this please? (4 Replies)
Discussion started by: usustarr
4 Replies

5. Solaris

Graphical program no longer works after Solaris 10 upgrade

This is a fairly complex issue. I do not have a lot of knowledge on X11. But here are the things. I am running a program called Synergy off a Solaris server. The server sits in a remote network and can be accessed via NAT. Using Putty, I will enable X11 forwarding and launch Synergy via Putty.... (0 Replies)
Discussion started by: Leion
0 Replies

6. Shell Programming and Scripting

awk: Input line Cannot be longer than 3,000 bytes.

Guys, I want to get the high CPU utilization from top. I am using below code : top -d2 >> /home/dba_monitoring/host_top_output.txt echo "Script started `date`" > $runlog usage=`grep "^ *$1" /home/dba_monitoring/host_top_output.txt | awk '{print $12}' | sed 's/%//'` And getting below... (7 Replies)
Discussion started by: wahab
7 Replies

7. Shell Programming and Scripting

Ending user sessions which have been on a program for longer than 1 hour

hi, im looking to write a script to end user sessions which are on a paticular program and have been for over an hour so I can free up the system a bit. I understand that the "who" command lists the current users logged into the system, however it does not let me see what program they are on... (12 Replies)
Discussion started by: 02JayJay02
12 Replies

8. UNIX for Dummies Questions & Answers

apply a function twice successively with the same input in awk program

Hi ! It is a general question. When an awk script looks like: #! bin/awk function example(i){ <body> } { example(1) #the function uses input_1 and return output_a } { example(2) #the function uses previous output_a as an input and returns... (15 Replies)
Discussion started by: beca123456
15 Replies

9. UNIX for Dummies Questions & Answers

AWK error - string cannot be longer than X bytes

Hi Friends, Could you please tell me why i am getting the below eror while working with awk. I am confused :confused: what to do ? awk: 0602-591 String 1,9,20,6,6 cannot be longer than 399 bytes. The source line is 1. The error context is >>> <<< awk: 0602-591... (2 Replies)
Discussion started by: i150371485
2 Replies

10. UNIX for Beginners Questions & Answers

How to check the processes running longer than 2 hours.?

HI can someone help me to check the process running more than 2 hours. I have the below command which shows the time and process id, however, I only need the processes running more than 2 hours. (8 Replies)
Discussion started by: Vinod
8 Replies
ctgexc.f(3)							      LAPACK							       ctgexc.f(3)

NAME
ctgexc.f - SYNOPSIS
Functions/Subroutines subroutine ctgexc (WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, LDZ, IFST, ILST, INFO) CTGEXC Function/Subroutine Documentation subroutine ctgexc (logicalWANTQ, logicalWANTZ, integerN, complex, dimension( lda, * )A, integerLDA, complex, dimension( ldb, * )B, integerLDB, complex, dimension( ldq, * )Q, integerLDQ, complex, dimension( ldz, * )Z, integerLDZ, integerIFST, integerILST, integerINFO) CTGEXC Purpose: CTGEXC reorders the generalized Schur decomposition of a complex matrix pair (A,B), using an unitary equivalence transformation (A, B) := Q * (A, B) * Z**H, so that the diagonal block of (A, B) with row index IFST is moved to row ILST. (A, B) must be in generalized Schur canonical form, that is, A and B are both upper triangular. Optionally, the matrices Q and Z of generalized Schur vectors are updated. Q(in) * A(in) * Z(in)**H = Q(out) * A(out) * Z(out)**H Q(in) * B(in) * Z(in)**H = Q(out) * B(out) * Z(out)**H Parameters: WANTQ WANTQ is LOGICAL .TRUE. : update the left transformation matrix Q; .FALSE.: do not update Q. WANTZ WANTZ is LOGICAL .TRUE. : update the right transformation matrix Z; .FALSE.: do not update Z. N N is INTEGER The order of the matrices A and B. N >= 0. A A is COMPLEX array, dimension (LDA,N) On entry, the upper triangular matrix A in the pair (A, B). On exit, the updated matrix A. LDA LDA is INTEGER The leading dimension of the array A. LDA >= max(1,N). B B is COMPLEX array, dimension (LDB,N) On entry, the upper triangular matrix B in the pair (A, B). On exit, the updated matrix B. LDB LDB is INTEGER The leading dimension of the array B. LDB >= max(1,N). Q Q is COMPLEX array, dimension (LDZ,N) On entry, if WANTQ = .TRUE., the unitary matrix Q. On exit, the updated matrix Q. If WANTQ = .FALSE., Q is not referenced. LDQ LDQ is INTEGER The leading dimension of the array Q. LDQ >= 1; If WANTQ = .TRUE., LDQ >= N. Z Z is COMPLEX array, dimension (LDZ,N) On entry, if WANTZ = .TRUE., the unitary matrix Z. On exit, the updated matrix Z. If WANTZ = .FALSE., Z is not referenced. LDZ LDZ is INTEGER The leading dimension of the array Z. LDZ >= 1; If WANTZ = .TRUE., LDZ >= N. IFST IFST is INTEGER ILST ILST is INTEGER Specify the reordering of the diagonal blocks of (A, B). The block with row index IFST is moved to row ILST, by a sequence of swapping between adjacent blocks. INFO INFO is INTEGER =0: Successful exit. <0: if INFO = -i, the i-th argument had an illegal value. =1: The transformed matrix pair (A, B) would be too far from generalized Schur form; the problem is ill- conditioned. (A, B) may have been partially reordered, and ILST points to the first row of the current position of the block being moved. Author: Univ. of Tennessee Univ. of California Berkeley Univ. of Colorado Denver NAG Ltd. Date: November 2011 Contributors: Bo Kagstrom and Peter Poromaa, Department of Computing Science, Umea University, S-901 87 Umea, Sweden. References: [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the Generalized Real Schur Form of a Regular Matrix Pair (A, B), in M.S. Moonen et al (eds), Linear Algebra for Large Scale and Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218. [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified Eigenvalues of a Regular Matrix Pair (A, B) and Condition Estimation: Theory, Algorithms and Software, Report UMINF - 94.04, Department of Computing Science, Umea University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87. To appear in Numerical Algorithms, 1996. [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software for Solving the Generalized Sylvester Equation and Estimating the Separation between Regular Matrix Pairs, Report UMINF - 93.23, Department of Computing Science, Umea University, S-901 87 Umea, Sweden, December 1993, Revised April 1994, Also as LAPACK working Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1, 1996. Definition at line 200 of file ctgexc.f. Author Generated automatically by Doxygen for LAPACK from the source code. Version 3.4.1 Sun May 26 2013 ctgexc.f(3)
All times are GMT -4. The time now is 04:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy