Function str_numeric &
( &
s, fmt, mold &
) &
Result (b)
!
Logical :: b
Character (len=*), Intent (in) :: s, fmt
Class (*), Intent (in) :: mold
However awk prints beyond the line
Code:
Class (*), Intent (in) :: mold
Here is the file
Code:
!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
!> \brief Determines if a string is numeric.
!
!> \par Example
!> \code{.f}
!> Character (len=8) :: s; Logical :: isnum;
!> \endcode
!
!> \param[in] s String.
!> \param[in] fmt Format descriptor.
!> \param[in] mold Scalar or an array of any type.
!
!> \result True if string represents a numeric value.
Function str_numeric &
( &
s, fmt, mold &
) &
Result (b)
!
Logical :: b
Character (len=*), Intent (in) :: s, fmt
Class (*), Intent (in) :: mold
Real :: r
Integer :: i
Double Precision :: d
Character (len=65) :: frmt
Integer :: ios
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,288
Thanks Given: 430
Thanked 480 Times in 395 Posts
Hi.
I was going to install Trisquel 7 in a Virtual Machine to see if I could duplicate your problem until I read this in a recent forum thread there:
Quote:
This distribution seems to be slowly dying and this is the main reason why I'll be leaving as soon as I get the time to do so. There is NO communication whatsoever with the community. We don't know what's going on; we are not informed about the future plans of the maintainers, there have been NO package updates for months and security-critical bugs just remain open without anyone from the development team commenting.
./s1 data2
Environment: LC_ALL = C, LANG = C
(Versions displayed with local utility "version")
OS, ker|rel, machine: Linux, 3.16.0-4-amd64, x86_64
Distribution : Debian 8.4 (jessie)
bash GNU bash 4.3.30
awk GNU Awk 4.1.1, API: 1.1 (GNU MPFR 3.1.2-p3, GNU MP 6.0.0)
sed (GNU sed) 4.2.2
perl 5.20.2
debb (local) 1.17
debb Delete, Extract Bounded Blocks of text, delimiters kept or omitted.
-----
Input data file data2:
!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
!> \brief Determines if a string is numeric.
!
!> \par Example
!> \code{.f}
!> Character (len=8) :: s; Logical :: isnum;
!> \endcode
!
!> \param[in] s String.
!> \param[in] fmt Format descriptor.
!> \param[in] mold Scalar or an array of any type.
!
!> \result True if string represents a numeric value.
Function str_numeric &
( &
s, fmt, mold &
) &
Result (b)
!
Logical :: b
Character (len=*), Intent (in) :: s, fmt
Class (*), Intent (in) :: mold
Real :: r
Integer :: i
Double Precision :: d
Character (len=65) :: frmt
Integer :: ios
End function str_numeric
! Extraneous stuff 1
! Extraneous stuff 2
Subroutine yam ( x )
Real x
write(6,*) " Hello from yam."
End subroutine yam
-----
Results, awk:
Function str_numeric &
( &
s, fmt, mold &
) &
Result (b)
!
Logical :: b
Character (len=*), Intent (in) :: s, fmt
Class (*), Intent (in) :: mold
Subroutine yam ( x )
Real x
-----
Results, sed:
Function str_numeric &
( &
s, fmt, mold &
) &
Result (b)
!
Logical :: b
Character (len=*), Intent (in) :: s, fmt
Class (*), Intent (in) :: mold
Subroutine yam ( x )
Real x
-----
Results, perl:
Function str_numeric &
( &
s, fmt, mold &
) &
Result (b)
!
Logical :: b
Character (len=*), Intent (in) :: s, fmt
Class (*), Intent (in) :: mold
Subroutine yam ( x )
Real x
-----
Results, debb:
Function str_numeric &
( &
s, fmt, mold &
) &
Result (b)
!
Logical :: b
Character (len=*), Intent (in) :: s, fmt
Class (*), Intent (in) :: mold
Subroutine yam ( x )
Real x
Good luck (on all accounts) ... cheers, drl
---------- Post updated at 21:57 ---------- Previous update was at 20:41 ----------
Hi.
Here is the result on trisquel-7:
Code:
./s1 data2
Environment: LC_ALL = C, LANG = C
(Versions displayed with local utility "version")
OS, ker|rel, machine: Linux, 3.13.0-39-lowlatency, x86_64
Distribution : Trisquel GNU/Linux 7.0
bash GNU bash 4.3.11
awk - ( /usr/bin/awk, 2016-08-06 )
sed (GNU sed) 4.2.2
perl 5.18.2
debb (local) 1.17
debb Delete, Extract Bounded Blocks of text, delimiters kept or omitted.
-----
Input data file data2:
!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
!> \brief Determines if a string is numeric.
!
!> \par Example
!> \code{.f}
!> Character (len=8) :: s; Logical :: isnum;
!> \endcode
!
!> \param[in] s String.
!> \param[in] fmt Format descriptor.
!> \param[in] mold Scalar or an array of any type.
!
!> \result True if string represents a numeric value.
Function str_numeric &
( &
s, fmt, mold &
) &
Result (b)
!
Logical :: b
Character (len=*), Intent (in) :: s, fmt
Class (*), Intent (in) :: mold
Real :: r
Integer :: i
Double Precision :: d
Character (len=65) :: frmt
Integer :: ios
End function str_numeric
! Extraneous stuff 1
! Extraneous stuff 2
Subroutine yam ( x )
Real x
write(6,*) " Hello from yam."
End subroutine yam
-----
Results, awk:
Function str_numeric &
( &
s, fmt, mold &
) &
Result (b)
!
Logical :: b
Character (len=*), Intent (in) :: s, fmt
Class (*), Intent (in) :: mold
Subroutine yam ( x )
Real x
-----
Results, sed:
Function str_numeric &
( &
s, fmt, mold &
) &
Result (b)
!
Logical :: b
Character (len=*), Intent (in) :: s, fmt
Class (*), Intent (in) :: mold
Subroutine yam ( x )
Real x
-----
Results, perl:
Function str_numeric &
( &
s, fmt, mold &
) &
Result (b)
!
Logical :: b
Character (len=*), Intent (in) :: s, fmt
Class (*), Intent (in) :: mold
Subroutine yam ( x )
Real x
-----
Results, debb:
Function str_numeric &
( &
s, fmt, mold &
) &
Result (b)
!
Logical :: b
Character (len=*), Intent (in) :: s, fmt
Class (*), Intent (in) :: mold
Subroutine yam ( x )
Real x
I see that there is also a gawk available. That might be useful to install.
Most likely you file has characters that should not be there, like DOS/Windows-style CR characters, so the empty lines are never empty.
You can also check your file with od -c.
Hi All I am trying to convert some Fortran subroutine to awk function , those who know kindly explain how to define function in awk, and how to call function
Fortran subroutine looks somewhat like this
SUBROUTINE GDATE (JD, YEAR,MONTH,DAY)
C
C---COMPUTES THE GREGORIAN CALENDAR DATE... (5 Replies)
I've found a few posts regarding passing parameters to a function or subroutine, but for some reason when I try to run a command based on part with these parameters it's not working. If I have the function echo the parameters they show correctly so I believe they are being passed right but the... (2 Replies)
Okay I have a 1TB drive that is almost completely full with vids. I am in the process of converting them to mp4. I have two scripts right now. One is a shell script to convert them with Handbrake. The other is a script to get a sort of progress report. To make things easier to understand, I will... (0 Replies)
So, I'm running a script with a couple of subroutines, one of which takes arguments using getopts. The first time i call the subroutine everything works as expected, the second time I call it none of the arguments change. Here's a small section of code that shows this behavior.
#!/bin/sh... (3 Replies)
Hi All
I am new to perl so had one question.
I have one Subroutine which works as expected and below is just an example.
where I ran a command and check the output.
so my question is if I have more than one command then how to check the results, meaning I want to add more command and check... (2 Replies)
I have issue running functions under case statement
#!/bin/bash
single() {
Commands
}
multiple() {
Commands
}
until ; do
echo -e " \t \t M A I N - M E N U Perforce delete script \n" (1 Reply)
Hi friends
I am Administrator for a system works with uinx OS but, many times I get messages from server console inform me about Subroutine is Hanging
so what can I do to reset this Subroutine?
Note: always when I got that I restart the server but I think that is not professional solution. (3 Replies)
Okay, so in AIX, there are various subroutines that is built in to the OS. The subroutine is I want to use is passwdpolicy(). So I want to construct a C program that will be able to pass credentials into the program and thusly into the subroutine.
I'm not asking for homework, or for someone to... (0 Replies)