I am new to scripting in AIX / UNIX. I have a script that runs 4 other scripts and I want to be able to pass in a agrument that I can check before I run the next script to see if the previous script finished with no errors.
Can someone send me an example of this as I'm sure it's pretty easy to... (1 Reply)
hi I am new to shell programming.....my question is while running one of my shell program it stops in between to accept input from the user and proceeds furthur after giving input....I want to know whether I can set this input through some files so that the shell acript reads the input from the... (10 Replies)
I'm pretty new to bash scripting and I've found myself writing things like this (and the same with even more nesting):
if $CATEGORIES; then
if $LABEL_SLOTS; then
$pyth "$wd/texify_grammar.py" "$input" "$texfile" "--label-slots" "--categories" "$CATEGORY_LIST"
... (9 Replies)
Hello
Please i want to pass parameter (the string s) to the shell script:
Quote:
String s="Hello";
Process process = Runtime.getRuntime().exec("sh script1.sh");
How can i do please?
Thank you (0 Replies)
Semi-newbie, so flame throwers to 'singe-only', please. ;-)
I have a large number of (say) .html files, where I'd like to do a recursive in-place search and replace a particular string. The following bit of perl works fine:
perl -pi -e 's/oldstring/newstring/g' `find ./ -name *.html`
... (2 Replies)
Hi Gurus,
Need some help with the shell scripting here.
#!/bin/ksh
ps -ef | grep -i sample.ksh | grep -v grep > abc.txt
if
then
echo "sample.ksh is executing"
else
echo "sample.ksh is not executing"
fi (1 Reply)
Hi All,
I am using the script for creating local queue and passing the arguments while running the script as below
n=0
while
do
e=`expr $n + 3`
echo 'DEFINE QL('$e') MAXDEPTH('$6') MAXMSGL('$7') DEFPSIST('$8') '$9'' | /apps/mqm_opt/bin/runmqsc $2
n=`expr $n + 1`
done
Running the... (5 Replies)
I found something insteresting when I tested passing arguments into my scripts.
My scripts is as below.
% cat passarg.env
#!/bin/csh
echo "passarg: argv = $argv argv = $argv"
passarg1.env $*
% cat passarg1.env
#!/bin/csh
echo "passarg1: argv = $argv argvp=$argv"
set str = "test... (5 Replies)
Hi All,
I have below simple shell script in cloudera quick start vm cenos 6 which copy file from source to destination.
# file_copy.sh
source_dir = ${source_dir}
target = ${target_dir}
cp source_dir target
and my parameter file is like below
#parameter_file.txt
source_dir =... (4 Replies)
Discussion started by: Narasimhasss
4 Replies
LEARN ABOUT PHP
htmlspecialchars_decode
HTMLSPECIALCHARS_DECODE(3) 1 HTMLSPECIALCHARS_DECODE(3)htmlspecialchars_decode - Convert special HTML entities back to charactersSYNOPSIS
string htmlspecialchars_decode (string $string, [int $flags = ENT_COMPAT | ENT_HTML401])
DESCRIPTION
This function is the opposite of htmlspecialchars(3). It converts special HTML entities back to characters.
The converted entities are: &, " (when ENT_NOQUOTES is not set), ' (when ENT_QUOTES is set), < and >.
PARAMETERS
o $string
- The string to decode.
o $flags
- A bitmask of one or more of the following flags, which specify how to handle quotes and which document type to use. The default
is ENT_COMPAT | ENT_HTML401.
Available $flags constants
+--------------+---------------------------------------------------+
|Constant Name | |
| | |
| | Description |
| | |
+--------------+---------------------------------------------------+
| | |
| ENT_COMPAT | |
| | |
| | Will convert double-quotes and leave single- |
| | quotes alone. |
| | |
| | |
| ENT_QUOTES | |
| | |
| | Will convert both double and single quotes. |
| | |
| | |
|ENT_NOQUOTES | |
| | |
| | Will leave both double and single quotes uncon- |
| | verted. |
| | |
| | |
| ENT_HTML401 | |
| | |
| | Handle code as HTML 4.01. |
| | |
| | |
| ENT_XML1 | |
| | |
| | Handle code as XML 1. |
| | |
| | |
| ENT_XHTML | |
| | |
| | Handle code as XHTML. |
| | |
| | |
| ENT_HTML5 | |
| | |
| | Handle code as HTML 5. |
| | |
+--------------+---------------------------------------------------+
RETURN VALUES
Returns the decoded string.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.4.0 | |
| | |
| | The constants ENT_HTML401, ENT_XML1, ENT_XHTML |
| | and ENT_HTML5 were added. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
A htmlspecialchars_decode(3) example
<?php
$str = "<p>this -> "</p>
";
echo htmlspecialchars_decode($str);
// note that here the quotes aren't converted
echo htmlspecialchars_decode($str, ENT_NOQUOTES);
?>
The above example will output:
<p>this -> "</p>
<p>this -> "</p>
SEE ALSO htmlspecialchars(3), html_entity_decode(3), get_html_translation_table(3).
PHP Documentation Group HTMLSPECIALCHARS_DECODE(3)