小编jas*_*t.h的帖子

使用 sed 的脚本在输出文件中添加了一个“e”

我有一个添加新用户并为用户域名创建虚拟主机的脚本。该脚本运行良好,但有一个例外……在 /etc/apache2/sites-available/ 中,我的所有虚拟主机文件都有两份副本,一份带有 e,一份没有。

我相信我的问题在于我使用 SED 命令时。我可以获得第二意见吗?

这是脚本:

# set the working directory
dir=$(pwd)

# request the new domain name
printf "Enter the new domain name, without the www (i.e newdomain.com):\n"
read newdomain

# request the new username
printf "Enter the new username (i.e newusername):\n"
read username

# create the new user
sudo adduser $username

# copy the virtual host to sites-available
sudo cp /templates/domain-vhost /etc/apache2/sites-available/$newdomain

# echo results
echo "Successfully created the virtual host file at: /etc/apache2/sites-available/$newdomain.."

# change …
Run Code Online (Sandbox Code Playgroud)

scripts

18
推荐指数
1
解决办法
5704
查看次数

Acer Aspire 1551 挂起后不会唤醒

我有一台运行 Ubuntu 10.10 64 位桌面的 Acer Aspire 1551-5448 上网本。

我喜欢转向 Ubuntu,但我的主要停止点是将笔记本电脑从挂起/休眠模式唤醒。电脑开机后黑屏。我知道这很可能是硬件问题,并且要注意我使用的是 ATI 驱动程序。

此外,我检查了/var/log/pm-suspend.log一切似乎正常,这意味着我没有看到任何故障。

有什么想法我接下来应该看什么?

suspend-resume 10.10 ati acer aspire

6
推荐指数
2
解决办法
2871
查看次数

标签 统计

10.10 ×1

acer ×1

aspire ×1

ati ×1

scripts ×1

suspend-resume ×1