бэдблоки и mkfs.ext4

Это можно сделать с помощью функции или с помощью && В приведенных ниже примерах устанавливается Zabbix и создается файл со строкой внутри.

Пример:

#!/bin/bash

# Create Function:
installZabbix(){
    cd /usr/src/zabbix-4.2.4;
   ./configure --enable-agent;
    make install;
    cd /usr/src/;
    >file;
    echo "Hi, this is a file." >>file;
}

# Call the function:
installZabbix

или:

#!/bin/bash
cd /usr/src/zabbix-4.2.4 &&./configure --enable-agent && make install && cd /usr/src && >file && echo "Hi, this is a file." >>file
1
15.05.2021, 19:38
0 ответов

Теги

Похожие вопросы