Sponsored Content
Full Discussion: Money script
Top Forums Shell Programming and Scripting Money script Post 18351 by Perderabo on Wednesday 27th of March 2002 08:28:12 AM
Old 03-27-2002
Well I would use sed...
Code:
#! /usr/bin/ksh
typeset -Z11 raw
raw=$1
format=$(echo $raw | sed 's/\(...\)\(...\)\(...\)\(..\)/\1,\2,\3.\4/')
format=${format##+([0,])}
[[ $format = .* ]] && format=0${format}
echo $format
exit 0

 

We Also Found This Discussion For You

1. Shell Programming and Scripting

Format Money/Currency (U.S.)

I have looked everywhere. Does bash have a money/currency format for output? Do I have to use awk or printf? Thank you (4 Replies)
Discussion started by: Ccccc
4 Replies
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 05:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy