Hey guys,
I'd like to delete all text within a text file without actually deleting the file. Is there a vi command I can do from my prompt without actually going into the file and doing a %d i think it is... to remove all the text inside?
I want to add this to a cron job to erase all the data... (2 Replies)
Hi
We had 3 server -hp112and hp146 here hp112 is production server and hp146 is staging server used for load.
when i am trying to run follwing command
rcp abc hp112:/dnbusr1/gbid/gbid02 it's trowing an error :-
remshd: Login incorrect.
But same command is working wise versa -
rcp abc... (1 Reply)
cat file.txt
fvnuiehuewf
ruevhxncvkjrh
zxjvurhfuwe
jkhvBEGINvfnvf
ijrgioe
Trying to delete a line that has the pattern "BEGIN"
cat sedtest
filename=file.txt
pattern=BEGIN
sed "/^$pattern/d" "$filename" (9 Replies)
Hi
Is it possible to do the following in a single command
/usr/xpg4/bin/sed -e '/rows selected/d' /aemu/CALLAUTO/callauto.txt > /aemu/CALLAUTO/callautonew.txt
/usr/xpg4/bin/sed -e '/^$/d' /aemu/CALLAUTO/callautonew.txt > /aemu/CALLAUTO/callauto_new.txt
exit (1 Reply)
How to use Mailx command in unix shell script, its throwing below error
#!/bin/ksh
let x=3
If ; then
mailx -s “ $x is greater than 2” example@gmail.com << EOF
This is the message body
EOF
fi
its throwing error as syntax error at EOF... (10 Replies)
Hi
I want to delete a line from a txt file for which the line number is user input. Say when user selects 19, the 19th line would be deleted from the file. Can anyone please provide me with a sed one liner for the same... I tried sed -i. The interaction would be like this
Enter the line to... (1 Reply)
Hi
I've gotten a plugin script that won't run. I keeps throwing an error at the following line.
for BARCODE_LINE in `cat ${TSP_FILEPATH_BARCODE_TXT} | grep "^barcode"`
do
#something
done
The error reads
... (3 Replies)
Hi
I want to delete a line from a txt file for which the line number is user input. Say when user selects 19, the 19th line would be deleted from the file. Can anyone please provide me with a sed one liner for the same... I tried sed -i. The interaction would be like this
Enter the line... (4 Replies)
Hi,
I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :-
./sample.sh: line... (12 Replies)
Hi,
I have a shell script which has a for loop that scans list of files and do find and replace few variables using sed command. While doing this, it deletes the last line of all input file which is something wrong. how to fix this. please suggest. When i add an empty line in all my input file,... (5 Replies)
Discussion started by: rbalaj16
5 Replies
LEARN ABOUT PHP
parsekit_compile_string
PARSEKIT_COMPILE_STRING(3) 1 PARSEKIT_COMPILE_STRING(3)parsekit_compile_string - Compile a string of PHP code and return the resulting op arraySYNOPSIS
array parsekit_compile_string (string $phpcode, [array &$errors], [int $options = PARSEKIT_QUIET])
DESCRIPTION
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.
PARAMETERS
o $phpcode
- A string containing phpcode. Similar to the argument to eval(3).
o $errors
- A 2D hash of errors (including fatal errors) encountered during compilation. Returned by reference.
o $options
- One of either PARSEKIT_QUIET or PARSEKIT_SIMPLE. To produce varying degrees of verbosity in the returned output.
RETURN VALUES
Returns a complex multi-layer array structure as detailed below.
EXAMPLES
Example #1
parsekit_compile_string(3) example
<?php
$ops = parsekit_compile_string('
echo "Foo
";
var_dump($ops);
?>
The above example will output:
array(20) {
["type"]=>
int(4)
["type_name"]=>
string(14) "ZEND_EVAL_CODE"
["fn_flags"]=>
int(0)
["num_args"]=>
int(0)
["required_num_args"]=>
int(0)
["pass_rest_by_reference"]=>
bool(false)
["uses_this"]=>
bool(false)
["line_start"]=>
int(0)
["line_end"]=>
int(0)
["return_reference"]=>
bool(false)
["refcount"]=>
int(1)
["last"]=>
int(3)
["size"]=>
int(3)
["T"]=>
int(0)
["last_brk_cont"]=>
int(0)
["current_brk_cont"]=>
int(-1)
["backpatch_count"]=>
int(0)
["done_pass_two"]=>
bool(true)
["filename"]=>
string(17) "Parsekit Compiler"
["opcodes"]=>
array(3) {
[8594800]=>
array(5) {
["opcode"]=>
int(40)
["opcode_name"]=>
string(9) "ZEND_ECHO"
["flags"]=>
int(768)
["op1"]=>
array(3) {
["type"]=>
int(1)
["type_name"]=>
string(8) "IS_CONST"
["constant"]=>
&string(4) "Foo
"
}
["lineno"]=>
int(2)
}
["859484C"]=>
array(6) {
["opcode"]=>
int(62)
["opcode_name"]=>
string(11) "ZEND_RETURN"
["flags"]=>
int(16777984)
["op1"]=>
array(3) {
["type"]=>
int(1)
["type_name"]=>
string(8) "IS_CONST"
["constant"]=>
&NULL
}
["extended_value"]=>
int(0)
["lineno"]=>
int(3)
}
[8594898]=>
array(4) {
["opcode"]=>
int(149)
["opcode_name"]=>
string(21) "ZEND_HANDLE_EXCEPTION"
["flags"]=>
int(0)
["lineno"]=>
int(3)
}
}
}
SEE ALSO parsekit_compile_file(3).
PHP Documentation Group PARSEKIT_COMPILE_STRING(3)