Sponsored Content
Full Discussion: tr command to delete zeros
Top Forums Shell Programming and Scripting tr command to delete zeros Post 302524418 by dean_amrita on Monday 23rd of May 2011 09:29:01 AM
Old 05-23-2011
tr command to delete zeros

Hi,

I have a input string 0000106 I need to extract the number after leading zeros ie the number 106. I used the command tr -d "0" and got the output as 16. Could any one of you please help me in using the tr command to get the output 106. Thanks in advance....
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove precursing zeros

Hello all, I have a list of reports for stores that are numbered like: s001845,s000022,s198490,s020048,s002385 however the users are displaying the reports as: 1845,22,198490,20048,2385 It isn't real critical but I would like to associate them so they are the same. And since the users are... (2 Replies)
Discussion started by: gozer13
2 Replies

2. Shell Programming and Scripting

Leading zeros

How to insert leading zeros into a left-justisfied zip code? e.g. Zip code is written as 60320 which is left-justified to make it be read as 0060320. We have to move it to right-justifiable then insert 2 leading zeros into it... ;) (1 Reply)
Discussion started by: wtofu
1 Replies

3. UNIX for Dummies Questions & Answers

regarding delete command in unix

Hai, The command sed 's/...$//' filename is not working.i need an unix command that works in the command mode i.e in the esc mode.pease let me know the command to delete the last 3 letters in every line of a file .The 3 letters vary from line to line. Regards suneetha. (3 Replies)
Discussion started by: gaddesuneetha
3 Replies

4. UNIX for Dummies Questions & Answers

pad Zeros

Hi can I know command to pad Zeros to a value I get 16 and I need to send 0000000016 (5 Replies)
Discussion started by: mgirinath
5 Replies

5. UNIX for Advanced & Expert Users

trimming zeros

Hi, I want to trim +with leading zero's with amount fields.I know using awk for trimming leading zeros with +,but I want get the entire row itself. cat file_name |awk -F " " '{printf "%14.4f%f\n",$4}' ex: 10 xyz bc +00000234.4500 20 yzx foxic +002456.000 Expexted 10 xyz bc... (3 Replies)
Discussion started by: mohan705
3 Replies

6. Shell Programming and Scripting

How to delete trailing zeros from a variable

Hi All I want to delete trailing zeros from varible. ex: if variable value is 1234.567000 result as 1234.567 if variable has 1234.0000 result as 1234 if variable as abcd.fgh result as abcd.fgh Can somone give me a solution using awk? (16 Replies)
Discussion started by: Chandu2u
16 Replies

7. UNIX for Dummies Questions & Answers

Command in vi - Block delete

What command I should provide in Vi so block deletionis possible ? (1 Reply)
Discussion started by: videsh77
1 Replies

8. Shell Programming and Scripting

Padding with zeros.

Hi Friends, I would like to left pad with "0's" on first column say (width six) I have a large file with the format: FILE: 1: ALFRED 84378 NY 8385: JAMES 88385 FL 323: SMITH 00850 TX My output needs to be like: 000001: ALFRED 84378 NY 008385: JAMES 88385 FL 000323: SMITH... (10 Replies)
Discussion started by: sbasetty
10 Replies

9. Shell Programming and Scripting

How to delete the submitted at command

Hi I have submitted an at command to run next week . Now i want to remove the submitted at command . I dont want the job to run . Can anyone help me , with the command to remove the submitted at command . thanks in advance ... (3 Replies)
Discussion started by: rxg
3 Replies

10. Shell Programming and Scripting

Please help - Command to Subtract two numbers without losing prefix zeros

Hello, I have a variable LOGNUM with values 0000095, When i subtract the variable by 1, Its losing its leading zeros. Can you please help me here ? LOGNUM=0000095 $OLDLOG=`echo "${LOGNUM}-1"|bc` $ echo $OLDLOG 94 Am expecting output as 0000094 Appreciate your help! Thanks,... (11 Replies)
Discussion started by: prince1987
11 Replies
tpm_takeownership(8)					      System Manager's Manual					      tpm_takeownership(8)

							TPM Management - tpm_takeownership

NAME
tpm_takeownership - setup an owner on the TPM SYNOPSIS
tpm_takeownership [OPTION] DESCRIPTION
tpm_takeownership setup an owner on the system's TPM (via the TPM_TakeOwnership API). This operation requires the TPM to be enabled and can be restricted by tpm_setownable. The command will prompt for owner and SRK passwords and confirmations of these if executed without either of the -well-known options, otherwise, a secret of all zeros is set for the requested password. After the second confirmation, be patient as the command may take awhile. -h, --help Display command usage info. -v, --version Display command version info. -l, --log [none|error|info|debug] Set logging level. -u, --unicode Use TSS UNICODE encoding for passwords to comply with applications using TSS popup boxes -y, --owner-well-known Set a secret of all zeros (20 bytes of zeros) as the owner's secret. -z, --srk-well-known Set a secret of all zeros (20 bytes of zeros) as the SRK secret. SEE ALSO
tpm_version(1), tpm_setownable(8), tpm_setenable(8), tcsd(8) REPORTING BUGS
Report bugs to <trousers-users@lists.sourceforge.net> TPM Management 2005-05-06 tpm_takeownership(8)
All times are GMT -4. The time now is 10:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy