Sponsored Content
Top Forums Shell Programming and Scripting How is html code read, compared to say python? Post 303009226 by Neo on Monday 11th of December 2017 07:42:52 AM
Old 12-11-2017
Actually, SkySmart was asking about the Shebang in scripts and comparing to HTML.

However, some of the things SkySmart said were not true, for example: "the first line of bash, perl, python, ruby, and similar languages must contain the path to the interpreter"...

This is not always true, as I can easily execute a PHP script from the command line by calling:

Code:
php filename.php

and the path to the interpreter is not required to execute the code. The same is true for most scripts when executed directly.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Python, HTML, and Unix

Hi Experts, This may be the wrong category for posting my question, or it could be the perfect category to post. I have no idea how difficult my problem is. I have python 2.3 installed in my server machine. I am trying to create a web page with python script in it. Now this can be a .html... (1 Reply)
Discussion started by: davidfrank
1 Replies

2. Shell Programming and Scripting

Read a file and put it in HTML format

Hi, I have one file as follows and I need to read this file contents in an HTML format. And send html file to some mail ids using sendmail. Communications Pvt Ltd Report AccountId Name Code IdBill Balance ... (3 Replies)
Discussion started by: Kattoor
3 Replies

3. Shell Programming and Scripting

Read html and get specific value

Hello guys :D I have a specific small html file which looks like this: <td><a href="/wiki/File:ABC_red_le_route.jpg" class="image" title="Chicago 'L' 2600 series train"><img alt="Chicago 'L' 2600 series train" src="example.com/random_image.com" width="550" height="255" /></a></td> I want... (3 Replies)
Discussion started by: hakermania
3 Replies

4. Shell Programming and Scripting

Read html attachment

Hi, I will get an email with a html attachment. I want to copy that html file to server in a particular location. Is it possible to do this.. If yes could you please help me on this.. Regards Neethu (1 Reply)
Discussion started by: Neethu
1 Replies

5. Shell Programming and Scripting

[SOLVED] Read html attachment from /var/mail

Hi, I am receiving an email to the server with a html attachment. When I check the /var/mail the attachment is showing as junk characters. I want to move that html file to a particular location in that server. Please help me. Regards Neethu (4 Replies)
Discussion started by: Neethu
4 Replies

6. Shell Programming and Scripting

Python Binary File Read and Parse

Hi to everyone :), i have a challenge right now in python that for now needs a bit of help in one part of the c0de. The task is create a new file with the name of the file defined by the ASCII content between the 3 byte and the 16 byte that is parsed from the binary file, the file is over 20 Mb i... (0 Replies)
Discussion started by: drd0spt
0 Replies

7. Shell Programming and Scripting

**python** unable to read the background color in python

I am working on requirement on spreadsheet in python scripting. I have a spreadsheet containing cell values and with background color. I am able to read the value value but unable to get the background color of that particular cell. Actually my requirement is to read the cell value along... (1 Reply)
Discussion started by: giridhar276
1 Replies

8. UNIX for Dummies Questions & Answers

Read data from excel and upload into html page

Hi, I have requirement for automation, wanna confirm whether is it possible in shell scripting. 1) Need to read data from excel sheet 2) And upload the details in html page I know first requirement is possible by converting excel into csv form, but not sure about the second one. If... (6 Replies)
Discussion started by: stew
6 Replies

9. Shell Programming and Scripting

Need python script to read a file

more data.txt user1:psw1:Moni,Admi user2:psw2:Depl,Moni,Admi I wish to perform the following task on the data.txt in my python script 1. read line by line data.txt 2. Once you read the first line split it using delimiter ":" i.e "user1" "psw1" & "Moni,Admi" 3. split the 3rd string i.e... (4 Replies)
Discussion started by: mohtashims
4 Replies

10. Shell Programming and Scripting

Feed python with read line in shell

Hello, I am running under ubuntu 14.04. I have a python file bringing requested data. When I run, it asks me to enter query info. After that, it gives the data if anything matched can be found. What I need to accomplish is, instead of entering the requested data from keyboard, to put all... (11 Replies)
Discussion started by: baris35
11 Replies
ERUBIS(1)							   User Commands							 ERUBIS(1)

NAME
erubis - eRuby style template engine for multiple languages SYNOPSIS
erubis [..options..] [file ...] DESCRIPTION
Embedded templating engine for multiple languages. Erubis will take a template file as input and output code to convey that data in the language specified. The following output languages are supported: * Ruby * PHP * C * Java * Scheme * Perl * JavaScript OPTIONS
-h, --help help -v version -x show converted code -X show converted code, only ruby code and no text part -N numbering: add line numbers (for '-x/-X') -U unique: compress empty lines to a line (for '-x/-X') -C compact: remove empty lines (for '-x/-X') -b body only: no preamble nor postamble (for '-x/-X') -z syntax checking -e escape (equal to '--E Escape') -p pattern embedded pattern (default '<% %>') -l lang convert but no execute (ruby/php/c/java/scheme/perl/js) -E e1,e2,... enhancer names (Escape, PercentLine, BiPattern, ...) -I path library include path -K kanji kanji code (euc/sjis/utf8) (default none) -c context context data string (yaml inline style or ruby code) -f datafile context data file ('*.yaml', '*.yml', or '*.rb') -T don't expand tab characters in YAML file -S convert mapping key from string to symbol in YAML file -B invoke 'result(binding)' instead of 'evaluate(context)' --pi=name parse '<?name ... ?>' instead of '<% ... %>' supported properties: * (common) --escapefunc=nil : escape function name --pattern="<% %>" : embed pattern --trim=true : trim spaces around <% ... %> --preamble=nil : preamble (no preamble when false) --postamble=nil : postamble (no postamble when false) --escape=nil : escape expression or not in default * (basic) * (pi) --pi="rb" : PI (Processing Instrunctions) name --embchar="@" : char for embedded expression pattern('@{...}@') * ruby * php * c --indent="" : indent spaces (ex. ' ') --out="stdout" : output file pointer name * java --indent="" : indent spaces (ex. ' ') --buf="_buf" : output buffer name --bufclass="StringBuffer" : output buffer class (ex. 'StringBuilder') * scheme --func="_add" : function name (ex. 'display') * perl --func="print" : function name * javascript --docwrite=true : use 'document.write()' when true EXAMPLES
Run 'erubis -l php example.ephp' to convert the embedded document to php code. example.ephp: <?xml version="1.0"?> <html> <body> <p>Hello <%= $user %>!</p> <table> <tbody> <% $i = 0; %> <% foreach ($list as $item) { %> <% $i++; %> <tr bgcolor="<%= $i % 2 == 0 ? '#FFCCCC' : '#CCCCFF' %>"> <td><%= $i %></td> <td><%== $item %></td> </tr> <% } %> </tbody> </table> </body> </html> SEE ALSO
http://rubyforge.org/projects/erubis/ erubis 2.6.2 January 2009 ERUBIS(1)
All times are GMT -4. The time now is 01:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy