403Webshell
Server IP : 202.61.199.114  /  Your IP : 216.73.217.139
Web Server : nginx/1.22.1
System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : web20 ( 1018)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/crons/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/crons/pacim_log_import.sh
#!/bin/bash

# Ordnerpfad, der die Excel-Dateien enthält
folder_path="/var/www/clients/client1/web17/web/datas/trash/2023-05-17"

# E-Mail-Einstellungen
sender_email="report@pacim.de"
recipient_email="nico@pacim.de"
smtp_server="cloud.pacim.de"
smtp_port="587"
smtp_username="report@pacim.de"
smtp_password="3ZNRkR=$Bfutfh35X81KL$k3PX"

# Log-Datei erstellen
log_file="excel_zeilenanzahl.log"
echo "Excel-Zeilenanzahl Log $(date)" > "$log_file"

# Schleife durch alle Excel-Dateien im Ordner
for file in "$folder_path"/*.xlsx; do
  if [ -f "$file" ]; then
    echo "Verarbeite Datei: $file"
    lines=$(ssconvert --count-lines "$folder_path/$file" 2>/dev/null)
    echo "Zeilenanzahl: $lines"
    echo "Datei: $file, Zeilenanzahl: $lines" >> "$log_file"
  fi
done

# Log-Datei per E-Mail senden
mail_subject="Excel-Zeilenanzahl Log $(date)"
mail_body=$(cat "$log_file")
sendmail -f "$sender_email" -smtp "$smtp_server:$smtp_port" -au "$smtp_username" -ap "$smtp_password" "$recipient_email" <<EOF
Subject: $mail_subject
$mail_body
EOF

# Log-Datei löschen
rm "$log_file"

Youez - 2016 - github.com/yon3zu
LinuXploit