Formatting digits


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Formatting digits
# 8  
Old 01-06-2009
ei..its working great! thank you so much.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

sed / awk script to delete the two digits from first 3 digits

Hi All , I am having an input file as stated below 5728 U_TOP_LOGIC/U_CM0P/core/u_cortexm0plus/u_top/u_sys/u_core/r03_q_reg_20_/Q 011 611 U_TOP_LOGIC/U_CM0P/core/u_cortexm0plus/u_top/u_sys/u_core/r04_q_reg_20_/Q 011 3486... (4 Replies)
Discussion started by: kshitij
4 Replies

2. Shell Programming and Scripting

Showing 4 digits

Hello everybody I'm a little beginer for shell script as I started last night... I have this script cat fichier.txt | while read l ; do #echo $l echo $x x=$(( $x + 1 )) done it's return 1 2 3 4 (4 Replies)
Discussion started by: remibemol
4 Replies

3. Programming

6 digits combination

Is there any program that can create 6 digit numbers with: (DIGIT_1)+(DIGIT_2)+(DIGIT_3)+(DIGIT_4)+(DIGIT_5)+(DIGIT_6)=10 Any perl or C also can. Anyone can help me? Thank you (6 Replies)
Discussion started by: Tzeronone
6 Replies

4. UNIX for Advanced & Expert Users

How to replace last 8 digits?

Hi, How I can replace last 8 ZEROS with 22991231? 19523479811841494432A2013052700000000 19523479811730333980A2013052700000000 19523479811417044397A2013052700000000 19523479811205895810C2013010120130131 A9523479811205895810A2013020120130228 19523479811205895810I2013030120130331... (9 Replies)
Discussion started by: jnrohit2k
9 Replies

5. Shell Programming and Scripting

Awk help required for formatting digits.

Hi experts, I have two values in the file : For example : partcamt = 72.90 partdamt=27.9 I need to convert these values into 6 digits and ignore the "." sign so that the desired desired output is : total value= 0072000027900 Currently I am using the following code : ... (3 Replies)
Discussion started by: nua7
3 Replies

6. Shell Programming and Scripting

Find filenames with three digits and add zeros to make five digits

Hello all! I've looked all over the internet and this site and have come up a loss with an easy way to make a bash script to do what I want to do. I have a file with a naming convention as follows: 2012-01-18 string of words here 123.jpg 2012-01-18 string of words here 1234.jpg 2012-01-18... (2 Replies)
Discussion started by: Buzzman25
2 Replies

7. Shell Programming and Scripting

help: single digits inflated to 2 digits

Hi Folks Probably an easy one here but how do I get a sequence to get used as mentioned. For example in the following I want to automatically create files that have a 2 digit number at the end of their names: m@pyhead:~$ for x in $(seq 00 10); do touch file_$x; done m@pyhead:~$ ls file*... (2 Replies)
Discussion started by: amadain
2 Replies

8. Shell Programming and Scripting

total last digits

hi group, How can I count total number of 5's which are continuous in the end. i.e. in the below string, the o/p should be 4 I just know to calculate total number of 5's $ echo "95952325555" | awk -F "5" '{print NF-1}' 6 (3 Replies)
Discussion started by: uwork72
3 Replies

9. UNIX for Dummies Questions & Answers

Only Digits as input

Hi All, I am new to shell script. I wrote a very small script that takes only digits as input- but there is some problem in that.can you help me in debugging that. #!/bin/ksh echo "Digits as input" read number digit='eval ' if ] then echo "Entered number is a digit" else echo... (2 Replies)
Discussion started by: namishtiwari
2 Replies

10. Shell Programming and Scripting

How to cut last 10 digits off

Hi I'm new to this. I need to cut off the last 10 digits from a line. I've used awk {'print $4'} filename.txt | cut -c 32-42 but this does not guarantee only the last 10 characters. Please help. Thanks. Sara (4 Replies)
Discussion started by: psarava
4 Replies
Login or Register to Ask a Question
cktime(1)							   User Commands							 cktime(1)

NAME
cktime, errtime, helptime, valtime - display a prompt; verify and return a time of day SYNOPSIS
cktime [-Q] [-W width] [-f format] [-d default] [-h help] [-e error] [-p prompt] [-k pid [-s signal]] /usr/sadm/bin/errtime [-W width] [-e error] [-f format] /usr/sadm/bin/helptime [-W width] [-h help] [-f format] /usr/sadm/bin/valtime [-f format] input DESCRIPTION
The cktime utility prompts a user and validates the response. It defines, among other things, a prompt message whose response should be a time, text for help and error messages, and a default value (which is returned if the user responds with a RETURN). The user response must match the defined format for the time of day. All messages are limited in length to 70 characters and are formatted automatically. Any white space used in the definition (including NEW- LINE) is stripped. The -W option cancels the automatic formatting. When a tilde is placed at the beginning or end of a message definition, the default text is inserted at that point, allowing both custom text and the default text to be displayed. If the prompt, help or error message is not defined, the default message (as defined under NOTES) is displayed. Three visual tool modules are linked to the cktime command. They are errtime (which formats and displays an error message), helptime (which formats and displays a help message), and valtime (which validates a response). These modules should be used in conjunction with FML objects. In this instance, the FML object defines the prompt. When format is defined in the errtime and helptime modules, the messages will describe the expected format. OPTIONS
The following options are supported: -d default Defines the default value as default. The default is not validated and so does not have to meet any criteria. -e error Defines the error message as error. -f format Specifies the format against which the input will be verified. Possible formats and their definitions are: %H = hour (00 - 23) %I = hour (00 - 12) %M = minute (00 - 59) %p = ante meridian or post meridian %r = time as %I:%M:%S %p %R = time as %H:%M (the default format) %S = seconds (00 - 59) %T = time as %H:%M:%S -h help Defines the help messages as help. -k pid Specifies that process ID pid is to be sent a signal if the user chooses to abort. -p prompt Defines the prompt message as prompt. -Q Specifies that quit will not be allowed as a valid response. -s signal Specifies that the process ID pid defined with the -k option is to be sent signal signal when quit is chosen. If no signal is specified, SIGTERM is used. -W width Specifies that prompt, help and error messages will be formatted to a line length of width. OPERANDS
The following operand is supported: input Input to be verified against format criteria. EXIT STATUS
The following exit values are returned: 0 Successful execution. 1 EOF on input, or negative width on -W option, or usage error . 3 User termination (quit) . 4 Garbled format argument. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) NOTES
The default prompt for cktime is: Enter a time of day [?,q]: The default error message is: ERROR: Please enter the time of day. Format is <format>. The default help message is: Please enter the time of day. Format is <format>. When the quit option is chosen (and allowed), q is returned along with the return code 3. The valtime module will not produce any output. It returns 0 for success and non-zero for failure. SunOS 5.11 14 Sep 1992 cktime(1)