Deprecated: Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1 in /var/www/html/plugins/system/falangdriver/falangdriver.php on line 534

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/plugins/system/t4/src/t4/MVC/Router/T4.php on line 388
shell脚本文件换行符转换 (如果之前是CRLF,需要转换) - Bluetooth forum - bluetooth蓝牙技术

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/components/com_comprofiler/plugin/user/plug_cbjdownloads/cbjdownloads.php on line 49

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/components/com_comprofiler/plugin/user/plug_cbblogs/cbblogs.php on line 48

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/components/com_comprofiler/plugin/user/plug_cbarticles/cbarticles.php on line 47

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 217

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 219

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 227

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 231

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 234

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239
Technical discuss

shell脚本文件换行符转换 (如果之前是CRLF,需要转换)


Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

  • Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 189

    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239
    service
  • [
    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 189

    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239
    service]

  • Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 189

    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239
    Topic Author

  • Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 189

    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

    Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239
    Offline
  • Administrator
  • Administrator
More
15 Jan 2026 10:48 - 15 Jan 2026 10:55 #1021
Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 189

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239
by service
New Topic
Code:
dos2unix xxx.sh
# 或者
Code:
sed -i 's/\r$//' smart_health_final.sh -----------
bash 运行时的错误 

xxx.sh: line 2: $'\r': command not found 
和 
warning: here-document at line 20 delimited by end-of-file (wanted 'EOF') 

都清楚地表明了问题所在:脚本文件的换行符是 Windows 风格的 CRLF (Carriage Return + Line Feed, \r\n)而不是 Linux/Unix 风格的 LF (Line Feed, \n)。
Linux 的 Bash 解析器无法正确处理 Windows 风格的 CRLF 换行符,它会把每一行末尾的 \r (回车符) 当作一个无效的命令尝试执行,导致 command not found 错误,并且破坏了多行字符串 (here-document) 的解析。
解决方案:
将脚本文件的换行符从 CRLF 转换为 LF。先尝试使用 dos2unix 命令进行转换,这是处理此类问题的标准工具。转换后应该就能正常执行脚本了。
Last edit: 15 Jan 2026 10:55 by service.

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 234

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 189

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
FaLang translation system by Faboba

Deprecated: Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1 in /var/www/html/plugins/system/falangdriver/falangdriver.php on line 100

Deprecated: Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1 in /var/www/html/plugins/system/falangdriver/falangdriver.php on line 100
mysqli object is already closed (500 Whoops, looks like something went wrong.)

Error

HTTP 500 Whoops, looks like something went wrong.

mysqli object is already closed

Exception

Error

  1. */
  2. public function disconnect()
  3. {
  4. // Close the connection.
  5. if (\is_callable([$this->connection, 'close'])) {
  6. $this->connection->close();
  7. }
  8. parent::disconnect();
  9. }
  1. */
  2. public function disconnect()
  3. {
  4. // Close the connection.
  5. if (\is_callable([$this->connection, 'close'])) {
  6. $this->connection->close();
  7. }
  8. parent::disconnect();
  9. }
  1. *
  2. * @since 2.0.0
  3. */
  4. public function __destruct()
  5. {
  6. $this->disconnect();
  7. }
  8. /**
  9. * Alter database's character set.
  10. *
DatabaseDriver->__destruct()

Stack Trace

Error
Error:
mysqli object is already closed

  at /var/www/html/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:318
  at mysqli->close()
     (/var/www/html/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:318)
  at Joomla\Database\Mysqli\MysqliDriver->disconnect()
     (/var/www/html/libraries/vendor/joomla/database/src/DatabaseDriver.php:496)
  at Joomla\Database\DatabaseDriver->__destruct()                

Deprecated: Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1 in /var/www/html/plugins/system/falangdriver/falangdriver.php on line 100

Deprecated: Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1 in /var/www/html/plugins/system/falangdriver/falangdriver.php on line 100