Sponsored Content
Full Discussion: For or while?
Top Forums Shell Programming and Scripting For or while? Post 302972351 by Don Cragun on Wednesday 4th of May 2016 09:17:50 AM
Old 05-04-2016
Why isn't the diagnostic output from ls sufficient to let you know that a file doesn't exist? If for some reason, you do need to test for a file's existence (without caring what its size is):
Code:
#!/bin/ksh
while read -r file
do	if [ -e "$file" ]
	then	printf 'file "%s" exists.\n' "$file"
		ls -lrt "$file"
	else	printf 'file "%s" does not exist.\n" "$file"
	fi
done < files.txt

 
INSTALLSIEVE(1) 					      General Commands Manual						   INSTALLSIEVE(1)

 *

NAME
installsieve - user utility for managing sieve scripts SYNOPSIS
installsieve DESCRIPTION
installsieve is a utility that allows users to manage their sieve scripts kept on the server. OPTIONS
-v <name> View script with the given name. The script if retrieved sucessfully is output to standard output. -l List all of the scripts currently on the server. If one of the scripts is active a arrow is printed indicating that it is the active script. -p <port> Port to connect to. If left off this defaults to "sieve" as defined in /etc/services. -i <file> Install a file onto the server. If a script with the same name already exists on the server it is overwritten. Upon sucessfully putting the script on the server the script is set active. If <file> has the extension .script it is chopped when put on the server since sieve names may not contain a '.'. -a <name> Set <name> as the active script. The list of available names can be obtained from the '-l' option.. -d <name> Delete the sieve script on the server with <name>. -m <mechanism> Force installsieve to use <mechanism> for authentication. If not specified the strongest authentication mechanism is chosen. -g <name> Get the sieve script with <name> and save it to disk with a ".script" extension. If a file with that name already exists it is overwritten. -u <user> Userid/Authname to use for authentication; by default, the current user. CMU
Project Cyrus INSTALLSIEVE(1)
All times are GMT -4. The time now is 01:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy