Nautilus Scripts
Ow Mun Heng
ow.mun.heng at wdc.com
Mon Dec 15 03:16:42 UTC 2003
> -----Original Message-----
> From: Vikram Goyal [mailto:viki at bol.net.in]
> Sent: Friday, December 12, 2003 8:29 PM
> To: fedora-list at redhat.com
> Subject: Re: Nautilus Scripts
>
> The script seems interesting. Can you post it to the list inline so
> that whoever finds it fit can have it.
This is from another site I found on the net
#!/bin/sh
#
# Add a new text file in the current directory.
# Script prompts you for the name and if it already exists,
# then the [ number] is incremented until unique.
#
# Distributed under the terms of GNU GPL version 2 or later
#
# Copyright (C) 2001 Johnathan Bailes (bailesj at mindspring.com)
# based on work by Jeffrey Philips
New_Document="`gdialog --title "Name of New Text file?" --inputbox "Name
the New Text file?" 200 100 2>&1`"
echo "$New_Document"
COUNT=1
if ! [ -a "./$New_Document.txt" ] ; then
touch "./$New_Document.txt"
else
while ! [ "$retry" ] ; do
let $((COUNT++))
if ! [ -a "./$New_Document($COUNT).txt" ] ; then
touch "./$New_Document($COUNT).txt"
retry=1
fi
done
fi
More information about the users
mailing list