Das ganze habe ich nun in ein script gepackt ( oder zumindest versucht )
Code:
#!/bin/sh
# PDF Tool Sammlung zum Einbinden in KDE Service Menüs
RETURN=""
#
# Prüfen, dass mindestens ein Argument übergeben wurde
#
if [ $# -lt 1 ] ; then
echo "Bitte das Script nicht direkt aufrufen." > /dev/stderr
exit 1
fi
#
# Fallunterscheidungen (anhand des ersten Parameters)
#
case "$1" in
pdftk-attach-files) # Usage: ./pdftk-tools.sh pdftk-attach-files <input.pdf>
# Prüfe Parameteranzahl
if [ $# -ne 2 ] ; then exit ; fi
# Hole Benutzereingaben
INPUT="$2"
ATTACHMENTS=`kdialog --title "Anhängen auswählen" --multiple --getopenfilename ~/ "*.pdf"`
if [ $? -ne 0 ] ; then exit ; fi # Abbrechen, falls der Dialog einfach geschlossen wurde (--> kdialog gibt Returncode 1 zurück)
OUTPUT="$INPUT.attachments.pdf"
# Starte pdftk
RETURN=`pdftk "$INPUT" attach_files "$ATTACHMENTS" output "$OUTPUT" 2>&1`
;;
pdftk-bla)
# irgendwas anders ...
;;
esac
#
# Fehlermeldung ausgeben, wenn das letzte ausgeführte Kommando nicht fehlerfrei ausgeführt wurde
#
if [ $? -ne 0 ] ; then
kdialog --title "Fehler" --error "$RETURN"
fi
Wenn ich im Konqueror oder im Dolphin eine Pdf-Datei mit der rechten Maustaste markiere und das script starte, öffnet sich ein
Fenster, indem ich auf der Festplatte die Dateien markieren kann, die ich als Anhang an das Pdf File haben möchte.
Anschließend wird eine Datei mit dem Namen xxx.attachments.pdf erzeugt. Leider hat diese Datei keine Anhänge. Woran kann das liegen?
I'm new to utilities like socat and netcat and I'm not clear if they will do what I need.
I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes.
I'm using Cygwin bash on Windows 10.
My... (3 Replies)
Hello all,
I am facing a weird issue while executing a code below -
#!/bin/bash
cd /wload/baot/home/baotasa0/sandboxes_finance/ext_ukba_bde/pset
sh UKBA_publish.sh UKBA 28082015 3
if
then
echo "Param file conversion for all the areas are completed, please check in your home directory"... (2 Replies)
I am trying to call a script(callingscript.sh) from a master script(masterscript.sh) to get string type value from calling script to master script. I have used scripts mentioned below.
#masterscript.sh
./callingscript.sh
echo $fileExist
#callingscript.sh
echo "The script is called"... (2 Replies)
I am using blow script :--
#!/bin/bash
FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not
if
then
# echo "process found"
exit 0;
else
echo "process not found"
exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
hello,
I have installed on my MacBookPro Ubuntu via Boot Camp, but bootcamp has deletet that MacOS partion and created just one new and installed ubuntu.
Now I can not install MacOS 10 from the DVD, the gray screen comes when I use the "C" key during the boot process. it starts booting... (2 Replies)
Hallo,
ich versuche in Crontab eine Befehlszeile einzufügen, das mein Script für ein Anti Flood Tool nach jedem neustart des Servers startet. Leider kenne ich mich Linux nicht soooo gut aus. Vielleicht kann mir jemand helfen?
Ich danke euch schon mal.
--> der Eintrag den ich geschrieben... (7 Replies)
Hallo,
ich habe folgende Dateien:
1Lmr12345.orig
1Lmr23456.orig
1Lmr34567.orig
Davon allerdings hunderte.
Wie lautet der Befehl um diese Dateien umzubenennen in
1Lmr12345
1Lmr23456
1Lmr34567
also ohne die Endung und ohne den Punkt?
Weiß einer was????? (1 Reply)
Hi guys
I have a shell script that executes sql statemets and sends the output to a file.the script takes in parameters executes sql and sends the result to an output file.
#!/bin/sh
echo " $2 $3 $4 $5 $6 $7
isql -w400 -U$2 -S$5 -P$3 << xxx
use $4
go
print"**Changes to the table... (0 Replies)