( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKBase.class.php on line 114
Call Stack
#TimeMemoryFunctionLocation
10.0014413984{main}( ).../index.php:0
20.10014264688Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.367213121368Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.367313121312Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.367413121688Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.367413121688Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.367513121784Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.367813160024require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.371613452384GKTemplate->__construct( ).../component.php:31
100.376313593904GKTemplateMenu->getMenuType( ).../gk.framework.php:84
110.376913637872require_once( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKMenu.php' ).../helper.menu.php:19

( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKHandheld.php on line 76
Call Stack
#TimeMemoryFunctionLocation
10.0014413984{main}( ).../index.php:0
20.10014264688Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.367213121368Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.367313121312Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.367413121688Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.367413121688Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.367513121784Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.367813160024require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.371613452384GKTemplate->__construct( ).../component.php:31
100.378713760736GKTemplateMenu->getMenuType( ).../gk.framework.php:85
awk中使用shell的环境变量
Logo
Print this page

awk中使用shell的环境变量

awk中使用shell的环境变量
一:"'$var'"
这种写法大家无需改变用'括起awk程序的习惯,是老外常用的写法.如:
var="test"
awk 'BEGIN{print "'$var'"}'
这种写法其实际是双括号变为单括号的常量,传递给了awk.
如果var中含空格,为了shell不把空格作为分格符,便应该如下使用:
var="this is a test"
awk 'BEGIN{print "'"$var"'"}'
二:'"$var"'
这种写法与上一种类似.如果变量含空格,则变为'""$var""'较为可靠.
三.把括起awk程序的''变为"",使用"$var"
如:
$var="this is a test"
awk 'BEGIN{print "$var"}"
这是因为在""里$是特殊字符,而在''里$是普通字符.
四:export 变量,使用ENVIRON["var"]形式,
如:
$var="this is a test";export $var
awk 'BEGIN{print ENVIRON["var"]}'
五:当然也可以使用-v选项
如:
$var="this is a test"
awk -vnvar="$var" '{print nvar}'
这样便把系统变量定义成了awk变量.


( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
Call Stack
#TimeMemoryFunctionLocation
10.0003414456{main}( ).../index.php:0
20.17174265192Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.17174265192Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.465711456384Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.466611480888Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.467611536216Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.473511563616require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.489111963248K2ControllerItem->execute( ).../k2.php:64
90.489111963248K2ControllerItem->display( ).../BaseController.php:710
100.510412613952K2ControllerItem->display( ).../item.php:78
110.510412613952K2ControllerItem->display( ).../controller.php:19
120.518512984992Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.542413005360K2ViewItem->display( ).../ViewController.php:102
140.684915852288K2ViewItem->display( ).../view.html.php:742
150.684915852288K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.698516025224include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701

( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
Call Stack
#TimeMemoryFunctionLocation
10.0003414456{main}( ).../index.php:0
20.17174265192Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.17174265192Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.465711456384Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.466611480888Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.467611536216Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.473511563616require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.489111963248K2ControllerItem->execute( ).../k2.php:64
90.489111963248K2ControllerItem->display( ).../BaseController.php:710
100.510412613952K2ControllerItem->display( ).../item.php:78
110.510412613952K2ControllerItem->display( ).../controller.php:19
120.518512984992Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.542413005360K2ViewItem->display( ).../ViewController.php:102
140.684915852288K2ViewItem->display( ).../view.html.php:742
150.684915852288K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.698516025224include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
Template Design © Joomla Templates | GavickPro. All rights reserved.