Sponsored Content
Top Forums Shell Programming and Scripting Using :<<cut / cut to comment out block of bash script Post 303021957 by Neo on Tuesday 21st of August 2018 12:51:58 PM
Old 08-21-2018
PHP users routinely remove and replace executable PHP code “on the fly”.

This is pretty standard these days to dynamically change executable code in runtime.
 

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cut usage in bash

Hello, Could you put some light on this: > echo "ref_categorie=test" | cut -c1-15- test > echo "ref_categorie=test" | cut -c1-14- =test echo "ref_categorie=test" | cut -c15- test echo "ref_categorie=test" | cut -c15 t > It's executed on AIX if that matters. The man page is not very... (2 Replies)
Discussion started by: tsurko
2 Replies

2. Shell Programming and Scripting

Cut out string in bash script

Hi all, I'm trying to extract string from variable in BASH. That's probably trivial for grep but I couldn't figure it out. I want to get name, there's sometimes digit after it, but it should be left out. STRING=http://name5.domain.com:8000/file.dat Could someone help me with that? Any... (10 Replies)
Discussion started by: cootue
10 Replies

3. Shell Programming and Scripting

Cut Command error cut: Bad range

Hi Can anyone what I am doing wrong while using cut command. for f in *.log do logfilename=$f Log "Log file Name: $logfilename" logfile1=`basename $logfilename .log` flength=${#logfile1} Log "file length $flength" from_length=$(($flength - 15)) Log "from... (2 Replies)
Discussion started by: dgmm
2 Replies

4. UNIX for Beginners Questions & Answers

Cut command: can't make it cut fields

I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Discussion started by: scrutinizerix
9 Replies
BCOMPILER_WRITE_EXE_FOOTER(3)						 1					     BCOMPILER_WRITE_EXE_FOOTER(3)

bcompiler_write_exe_footer - Writes the start pos, and sig to the end of a exe type file

SYNOPSIS
bool bcompiler_write_exe_footer (resource $filehandle, int $startpos) DESCRIPTION
An EXE (or self executable) file consists of 3 parts: o The stub (executable code, e.g. a compiled C program) that loads PHP interpreter, bcompiler extension, stored Bytecodes and initiates a call for the specified function (e.g. main) or class method (e.g. main::main) oThe Bytecodes (uncompressed only for the moment) oThe bcompiler EXE footer To obtain a suitable stub you can compile php_embed-based stub phpe.c located in the examples/embed directory on bcompiler's CVS. PARAMETERS
o $filehandle - A file handle as returned by fopen(3). o $startpos - The file position at which the Bytecodes start, and can be obtained using ftell(3). RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 bcompiler_write_exe_footer(3) example <?php /* creating the output file (example.exe) */ $fh = fopen("example.exe", "w"); /* 1) writing a stub (phpe.exe) */ $size = filesize("phpe.exe"); $fr = fopen("phpe.exe", "r"); fwrite($fh, fread($fr, $size), $size); $startpos = ftell($fh); /* 2) writing bytecodes */ bcompiler_write_header($fh); bcompiler_write_class($fh, "myclass"); bcompiler_write_function($fh, "main"); bcompiler_write_footer($fh); /* 3) writing EXE footer */ bcompiler_write_exe_footer($fh, $startpos); /* closing the output file */ fclose($fh); ?> NOTES
Warning This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk. SEE ALSO
bcompiler_write_header(3), bcompiler_write_class(3), bcompiler_write_footer(3). PHP Documentation Group BCOMPILER_WRITE_EXE_FOOTER(3)
All times are GMT -4. The time now is 03:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy