Gerador de cabeçalho
Publicado por Mauriciodez (última atualização em 10/12/2018)
[ Hits: 10.231 ]
Download 6923.gera_cabecalho.sh
Script para inserção de cabeçalho em novo script ou em existente.
Link do projeto: https://github.com/mauriciodez/gera_cabecalho.git
Licença GPLv3.
#!/bin/bash ##### NOME: gera_cabecalho.sh ##### VERSÃO: 1.0 ##### DESCRIÇÃO: Insere cabeçalhos em novos scripts ou em existentes. ##### DATA DA CRIAÇÃO: 09/12/2018 ##### ESCRITO POR: Maurício G. Paiva ##### E-MAIL: mauriciodez@gmail.com ##### DISTRO: Debian GNU/Linux 8 (jessie) ##### LICENÇA: GPLv3 ##### PROJETO: https://github.com/mauriciodez/gera_cabecalho.git TR="#####" USER="Maurício G. Paiva" EMAIL="mauriciodez@gmail.com" GIT="https://github.com/mauriciodez/" VS="GPLv3" TXT2 () { sed -i "2s,^,\n$TR\tNOME:\t\t\t\t$(echo $ARQ)\n$TR\tVERSÃO:\t\t\t\t1.0\n$TR\tDESCRIÇÃO:\t\t\t$descricao \ \n$TR\tDATA DA CRIAÇÃO:\t$(date +"%d/%m/%Y")\n$TR\tESCRITO POR:\t\t$USER\n$TR\tE-MAIL:\t\t\t\t$EMAIL \ \n$TR\tDISTRO:\t\t\t\t$(cat /etc/*-release|head -1|awk -F'"' '{print $2}')\n$TR\tLICENÇA:\t\t\t$VS \ \n$TR\tPROJETO:\t\t\t$GIT$(echo $ARQ|cut -d'.' -f1)\n," $ARQ } x="s" while [ 1 ]; do clear && ls *.sh echo -e "Qual o arquivo que deseja modificar ? [ENTER] para novo arquivo" read ARQ if [ -z $ARQ ];then echo "Mode de criação" read -p "Insira o nome para o novo arquivo -> " ARQ if [ `echo $ARQ | cut -d'.' -f2` != "sh" ];then ARQ=`echo "$ARQ.sh"` fi echo -e "#!/bin/bash\n" > $ARQ read -p "Insira a descrição do script -> " descricao TXT2 chmod +x $ARQ else if [ `echo $ARQ | cut -d'.' -f2` != "sh" ];then ARQ=`echo "$ARQ.sh"` fi if [ -e "$ARQ" ];then read -p "Insira a descrição do script -> " descricao TXT2 else echo "Arquivo não encontrado quer fazer de novo ? ENTER ou 's'" read resposta if [ $resposta != $x ]; then exit fi fi fi done
Script em Xdialog para montar/desmontar dispositivos
Nenhum comentário foi encontrado.
Curiosidade sobre DOOM Guy e Isabelle de Animal Crossing
Inicializando servidor Ubuntu na AWS e rodando apache em Container
DOOM mais fácil que atacar imp pelas costas
Atualizar o macOS no Mac - Opencore Legacy Patcher
Crie alias para as tarefas que possuam longas linhas de comando - bash e zsh
Corrigindo o erro de "WARNING: Possibly missing firmware for module" no Arch Linux
Instalando TeamViewer no Fedora 40
Como adicionar uma interface gráfica ao Pacman do Arch - versão mais nova
Implementar este código em C++ [RESOLVIDO] (5)
rodar rockylinux no virtualbox (13)