Sponsored Content
Full Discussion: Campimeter.sh for macOS
Top Forums Programming Campimeter.sh for macOS Post 303043508 by wisecracker on Thursday 30th of January 2020 02:30:50 AM
Old 01-30-2020
Quote:
Originally Posted by RavinderSingh13
Thanks for sharing nice code wisecracker Smilie
Please forgive me if I am wrong here, I believe shebang should be #!/bin/bash right?
Or please correct me if I missed something here, cheers.

Thanks,
R. Singh
Ha ha, thanks and corrected post #1...
Barry...
This User Gave Thanks to wisecracker For This Post:
 

6 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

UNIX on MacOS X

I am interested in knowing if anyone out there has been using the BSD UNIX that underlies MacOS X. Is this an "industrial strength" version of UNIX? Can I run X-Windows on such a machine? How about TeXing, pythoning, PERLing or using other useful UNIX goodies near and dear to my shrunken... (1 Reply)
Discussion started by: ncmathsadist
1 Replies

2. UNIX for Dummies Questions & Answers

Vuze/MacOS X: Too many open files

1) How can I stop Vuze from reporting the following error: "Too many open files" ? 2) What directory do I need to be in to effectively utilize this command: sudo bash -c 'ulimit -n 8192; sudo -u username ./azureus' ? 3) Is this the maximum number of files that I can allot to Vuze on OS X... (1 Reply)
Discussion started by: JFraser1
1 Replies

3. UNIX for Beginners Questions & Answers

Memory leak with awk on MacOs

Dear all, I use awk quite a bit for data wrangling ... today I find weird behavior that I cannot wrap my head around. if I execute the following command (simplified to illustrate the behavior ... nothing to do with the real command) bash-3.2$ awk... (3 Replies)
Discussion started by: comm|getline
3 Replies

4. UNIX for Beginners Questions & Answers

Macos is the UNIX?

why,just beacuse that its the bottom layer uses a small amount of bsd code? In my opinion, macos and Unix are completely different. The directories are long directory structures. For example, /application, /system, /user, /volumes, etc. are completely different from the traditional /bin/ /sbin... (5 Replies)
Discussion started by: malaizhichun
5 Replies

5. OS X (Apple)

MacOS 10.15 (Catalina) switches from bash to zsh

Interestingly Apple has decided to switch the default shell for new users from bash to zsh in MacOS Catalina (10.15) Use zsh as the default shell on your Mac - Apple Support Another interesting fact is that Catalina also comes with /bin/dash (5 Replies)
Discussion started by: Scrutinizer
5 Replies

6. OS X (Apple)

My original Python Campimeter code, originall for OSX 10.7.5.

Hi all... This was the original code I created to expand a terminal on the fly using Python 2.6.x to the now 3.8.0 without modification under OSX 10.7.5. I had no idea at the time that the MBP terminal could be full screen until here:... (0 Replies)
Discussion started by: wisecracker
0 Replies
TAP::Parser::SourceHandler::Perl(3)			User Contributed Perl Documentation		       TAP::Parser::SourceHandler::Perl(3)

NAME
TAP::Parser::SourceHandler::Perl - Stream TAP from a Perl executable VERSION
Version 3.28 SYNOPSIS
use TAP::Parser::Source; use TAP::Parser::SourceHandler::Perl; my $source = TAP::Parser::Source->new->raw( 'script.pl' ); $source->assemble_meta; my $class = 'TAP::Parser::SourceHandler::Perl'; my $vote = $class->can_handle( $source ); my $iter = $class->make_iterator( $source ); DESCRIPTION
This is a Perl TAP::Parser::SourceHandler - it has 2 jobs: 1. Figure out if the TAP::Parser::Source it's given is actually a Perl script ("can_handle"). 2. Creates an iterator for Perl sources ("make_iterator"). Unless you're writing a plugin or subclassing TAP::Parser, you probably won't need to use this module directly. METHODS
Class Methods "can_handle" my $vote = $class->can_handle( $source ); Only votes if $source looks like a file. Casts the following votes: 0.9 if it has a shebang ala "#!...perl" 0.75 if it has any shebang 0.8 if it's a .t file 0.9 if it's a .pl file 0.75 if it's in a 't' directory 0.25 by default (backwards compat) "make_iterator" my $iterator = $class->make_iterator( $source ); Constructs & returns a new TAP::Parser::Iterator::Process for the source. Assumes "$source->raw" contains a reference to the perl script. "croak"s if the file could not be found. The command to run is built as follows: $perl @switches $perl_script @test_args The perl command to use is determined by "get_perl". The command generated is guaranteed to preserve: PERL5LIB PERL5OPT Taint Mode, if set in the script's shebang Note: the command generated will not respect any shebang line defined in your Perl script. This is only a problem if you have compiled a custom version of Perl or if you want to use a specific version of Perl for one test and a different version for another, for example: #!/path/to/a/custom_perl --some --args #!/usr/local/perl-5.6/bin/perl -w Currently you need to write a plugin to get around this. "get_taint" Decode any taint switches from a Perl shebang line. # $taint will be 't' my $taint = TAP::Parser::SourceHandler::Perl->get_taint( '#!/usr/bin/perl -t' ); # $untaint will be undefined my $untaint = TAP::Parser::SourceHandler::Perl->get_taint( '#!/usr/bin/perl' ); "get_perl" Gets the version of Perl currently running the test suite. SUBCLASSING
Please see "SUBCLASSING" in TAP::Parser for a subclassing overview. Example package MyPerlSourceHandler; use strict; use vars '@ISA'; use TAP::Parser::SourceHandler::Perl; @ISA = qw( TAP::Parser::SourceHandler::Perl ); # use the version of perl from the shebang line in the test file sub get_perl { my $self = shift; if (my $shebang = $self->shebang( $self->{file} )) { $shebang =~ /^#!(.*perl.*?)(?:(?:s)|(?:$))/; return $1 if $1; } return $self->SUPER::get_perl(@_); } SEE ALSO
TAP::Object, TAP::Parser, TAP::Parser::IteratorFactory, TAP::Parser::SourceHandler, TAP::Parser::SourceHandler::Executable, TAP::Parser::SourceHandler::File, TAP::Parser::SourceHandler::Handle, TAP::Parser::SourceHandler::RawTAP perl v5.16.3 2013-05-02 TAP::Parser::SourceHandler::Perl(3)
All times are GMT -4. The time now is 10:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy