Linux``编写脚本文件实现如下功能:

2024-11-09 04:57:49
推荐回答(2个)
回答1:

#!/bin/bash
echo 'Design by KMLinux.Buildtime:2010/4/25.The script for hello user.'
echo 'Hello!'
echo `whoami`
echo "The computer name is:"
echo `uname -n`
echo "Login User:"
echo `whoami`
echo "Time:"
echo `date`
echo "The script end"

回答2:

#!/usr/bin/env bash

#注释说明自己添加吧

echo "hello $USER"
echo "hostname is $HOSTNAME"
echo "$USER $(/bin/date)"