RE: Nautilus Scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Vikram Goyal [mailto:viki@xxxxxxxxxx]
> Sent: Friday, December 12, 2003 8:29 PM
> To: fedora-list@xxxxxxxxxx
> 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@xxxxxxxxxxxxxx)
# 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




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux