Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我希望我的bash程序看到的日期与实际日期不同_Bash_Date - Fatal编程技术网

我希望我的bash程序看到的日期与实际日期不同

我希望我的bash程序看到的日期与实际日期不同,bash,date,Bash,Date,我需要一个bash脚本来为我的程序设置日期。程序的工作日期必须与当前日期不同。可能吗?与: #!/bin/sh date 122511462014.30 && myprogram 我收到以下错误消息 日期:无法设置日期:不允许操作 因为我的脚本运行时没有root权限。您不能这样做日期更改整个系统的日期 我想您需要类似于的东西,只是更改myprogram是不可能的?

我需要一个bash脚本来为我的程序设置日期。程序的工作日期必须与当前日期不同。可能吗?与:

#!/bin/sh

date 122511462014.30 && myprogram
我收到以下错误消息

日期:无法设置日期:不允许操作


因为我的脚本运行时没有root权限。

您不能这样做<代码>日期更改整个系统的日期


我想您需要类似于

的东西,只是更改
myprogram
是不可能的?