create html page using awk command [closed] - html

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
I am using below command to create html page using below awk command
`awk -F, 'BEGIN {print "<tbody>"} ; { print "<tr><td bgcolor='$bgcol'><center><a href=http://10.0.0.1/cgi-bin/categ?$1>" $1 "</a></center></td><td bgcolor='$bgcol'><center>" $2 "</center></td></tr>"} ; END { print "</tbody>"}' /tmp/temps/sitecount`
below are contents of sitecount file example
Traditional Religions,10
When running above command i am getting below output
<tr><td bgcolor=#DCDCDC><center><a href=http://10.0.0.1/cgi-bin/categ?$1>Traditional Religions</a></center></td><td bgcolor=#DCDCDC><center>10</center></td></tr>
But i need this output
<tr><td bgcolor=#DCDCDC><center><a href=http://10.0.0.1/cgi-bin/categ?Traditional Religions>Traditional Religions</a></center></td><td bgcolor=#DCDCDC><center>10</center></td></tr>
I need to pass value "Traditional Religions' to my cgi script and not "$1"

problem resolved by changing this
<a href=http://10.0.0.1/cgi-bin/categ?"$1">

Related

Extract values after certain string with Google Sheets [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I'm trying to extract the values that come after the word 'rawValue=' in the following text with a Google Sheet REGEX formula, so not a script.
nowrap;" rawValue="-18245000000">18,245</div><div id="Y_5"
class="pos" style="overflow:hidden;white-space: nowrap;"
rawValue="19916000000">19,916</div><div id="Y_6" class="pos"
style="overflow:hidden;white-space: nowrap;"
rawValue="20350000000">20,350</div></div><div id="data_i25"
class="rf_crow" style="display:none"><div id="Y_1" class="pos"
style="overflow:hidden;white-space: nowrap;"
rawValue="—">—</div><div id="Y_2" class="pos"
style="overflow:hidden;white-space: nowrap;"
rawValue="—">—</div><div id="Y_3"
The variations that follow 'rawValue=' are fourfold:
a large positive number: 19916000000
a large negative number: -18245000000
a small number: 0
the words mdash or nbsp, in the example above: mdash
The examples above are also the preferable output form.
How would I be able to extract all these cases? Good to know is that the amount of instances of rawValues in a cell varies. So it should work regardless of how many matches there are, if that's even possible..
Can anyone help me with this? Much appreciated!
try:
=ARRAYFORMULA(REGEXEXTRACT(SPLIT(REGEXEXTRACT(A2;
"(rawValue="".+)"); "rawValue="""; 0); "^([^""]+)"))

sWhat will be the explaination of output of the below mentioned C problem? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 2 years ago.
Improve this question
What will be the output of the following programs:
#include <stdio.h>
int main()
{
printf("ab\tab\tab\ba");
return 0;
}
The result would be ab ab aa.
This is because the string contains certain characters("ab \t ab \t ab \b a") that the program will detect. \t(This is tab, It will usually add four spaces in its spot) and \b( means backspace, so it will delete the previous character in the string).

SyntaxError in UsersController#index [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
syntax error, unexpected end-of-input, expecting keyword_end
- if flash.present?
- flash.each do |type, message|
%strong #{type.titleize}:
=message
#mina HAML is sensitive for blank spaces. so the code you want inside the if block must be 1 tab indented in next line like:
- if flash.present?
- flash.each do |type, message|
%strong
= type.titleize + ":"
= message
- sign is used for ruby code to evaluate etc
= sign is used to show the output of code on your browser.
for more information see haml documentation
You wrote this way?
- if flash.present?
- flash.each do |type, message|
%strong
= type.titleize + ":"
= message

regex that does not allow comma blank together [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have a html input field, which shall not be able to allow ", " (comma and blank space after comma) via the pattern tag but comma and blank extra should be allowed
Looks like these:
<input type="text" name="ausg" pattern="" title="xx">
^$|^[\w,]+$
The ^ and $ match the beginning and the end of the text.
Use \w that include [a-zA-Z0-9_].
, Match a Comma.
+ 1 or more.
UPDATE
^[\w\s]+(?:,[^\s]+)?$
JSFiddle Demo

linux bash and html variables (import and export) [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I've something like:
var1=name
var2=surname
I need export these variables and import it to html file
any idea?
echo "<html><body>" > index.html
echo "var1 is $var1 <br>" >> index.html
echo "var2 is $var2 <br>" >> index.html
echo "</body></html>" >> index.html
For a simplistic form of templating, you can do
var1=name
var2=surname
cat > somefile.html << EOF
<title>$var1's demo page!</title>
<body>
Hello, $var1 $var2.
</body>
EOF