12-21-2011
increment counter as suffix starting with the rightmost digit
Hi,
I would like to add a suffix to a file name but maintain the suffix length to 5 digits.
For eg,
output > 1st_file.00001, 2nd_file.00002...10th_file.00010....100th_file.00100
Can anyone please advise me on how to go about it?
Platform: SunOS mps201a 5.9 Generic_118558-39 sun4u sparc SUNW,Sun-Fire-15000
Thanks
Danish
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Simple script trying to increment a counter within an echo statement never gets past 1 - PLEASE HELP!
Thanks.
~~~~~~~~~~~
#!/bin/sh
stepup()
{
STEP=`expr $STEP + 1`
echo $STEP
}
#
# Initialize variables
#
STEP=0
echo "Counter Value: `stepup`"
echo "Counter Value:... (2 Replies)
Discussion started by: blaze
2 Replies
2. Shell Programming and Scripting
Hello,
I am making an increment counter in ksh. So i write a number in a temporary file and when I execute my script I read this file and I make +1.
But how can I make this with a number with 6 digits , example
000009 + 1 = 000010
...
....
....
000099 + 1 = 000100
Do anyone know... (5 Replies)
Discussion started by: steiner
5 Replies
3. UNIX for Dummies Questions & Answers
Hi guys,
Can someone help me out with this:
I have a directory with files like the following,
GHost++ 2010-03-14 04-01 DotaCash RD us_ca LC #7 (44m19s).w3g
GHost++ 2010-03-14 04-06 DotaCash AP us_ca LC #8 (42m24s).w3g
GHost++ 2010-03-14 04-07 DotaCash AR us_ca LC #10 (08m23s).w3g ... (4 Replies)
Discussion started by: hbjlee17
4 Replies
4. Shell Programming and Scripting
Have columns with digits and strings like:
input.txt
3840 3841 3842 Dav Thun Tax
Cahn 146; Dav.
3855 3853 3861 3862 Dav Thun Tax
2780 Karl VI.,
3873 3872 3872 Dav Thun Tax
3894 3893 3897 3899 Dav Thun Tax
403; Thun 282.
3958 3959 3960 Dav Thun Tax
3972 3972 3972 3975 Dav Thun Tax... (8 Replies)
Discussion started by: sdf
8 Replies
5. Shell Programming and Scripting
Hi Guys.
My Input:
ABCD 12 00 KL
ABCD 12 08 DL
ABCD 12 10 KK
ABCD 12 04 LL
ABCD 13 00 LP
ABCD 13 1O LS
Output:
ABCD 12 0 KL
ABCD 12 8 DL
ABCD 12 10 KK
ABCD 12 4 LL
ABCD 13 0 LP (2 Replies)
Discussion started by: pareshkp
2 Replies
6. Shell Programming and Scripting
I have a bunch of files, they have spaces! I am working in windows 7, but I am hoping I could install and use cygwin or some other unix platform to rename my files (suggestions welcome).
The files are named:
Wind Attn Vol - 474.wrl
Wind Attn Vol - 475.wrl
Wind Attn Vol - 476.wrl etc..
I... (10 Replies)
Discussion started by: d_sai_kumar
10 Replies
7. Shell Programming and Scripting
Hi,
i have a scenario were i should compare a few fields from each line then increment a variable based on that.
Example file
989878|8999|Y|0|Y|N|V
989878|8999|Y|0|N|N|V
989878|8999|Y|2344|Y|N|V
i have 3 conditions to check and increment a variable on every line
condition 1 if ( $3... (4 Replies)
Discussion started by: selvankj
4 Replies
8. Shell Programming and Scripting
Hi all,
I'm using Bash 4.3.8 on an Ubuntu system, and no matter what I try, incrementing a counter won't work. The simplest example would be something like this:
#!/bin/bash
myVar=0
myVar=$((myVar++))
echo myVar
The variable should be 1, but it's always 0. I've tried every increment... (6 Replies)
Discussion started by: Zel2008
6 Replies
9. Shell Programming and Scripting
Hi All
i have a file say test with the following output
vserver share-name path acl
test test test "test/Read",
"test/write"
Expecting the below output
... (5 Replies)
Discussion started by: venkitesh
5 Replies
10. UNIX for Beginners Questions & Answers
I am trying to process only IonCode_odd #'s (always 4 digits starting with zero), but the below isn't working as expected. Is there a better way? Thank you :).
IonCode_0401_xxxx_xxxx_xxxx.bam
IonCode_0401_xxxx_xxxx_xxxx.bam.bai
IonCode_0401_xxxx_xxxx_xxxx.fastq... (2 Replies)
Discussion started by: cmccabe
2 Replies
cvcd(1M) System Administration Commands cvcd(1M)
NAME
cvcd - virtual console daemon
SYNOPSIS
/platform/platform_name/cvcd
DESCRIPTION
The virtual console daemon, cvcd, is a server process that supports the network console provided on some platforms. The cvcd daemon accepts
network console connections from a remote host (only one host at any given time). Console input is read from this connection and forwarded
to cvc(7D) by way of cvcredir(7D).
Similarly, console output is read from cvcredir(7D) and forwarded across the network console connection. If cvcd dies, console traffic is
automatically rerouted through an internal hardware interface.
The cvcd daemon normally starts at system boot time. Each domain supports only one cvcd process at a time.
Caution: On Sun Enterprise 10000 domains, cvcd uses a configuration file (/etc/ssphostname) to determine the name of the host from
which network console connections are allowed. If the remote console host is renamed, you must edit the configuration file
to reflect that change.
OPERANDS
The following operands are supported:
platform_name The official Sun platform name used in packaging and code. For example, for Sun Fire 15K servers, the platform_name
would be SUNW,Sun-Fire-15000.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Architecture |Sun Enterprise 10000 |
| |servers, Sun Fire High-End |
| |Systems |
+-----------------------------+-----------------------------+
|Availability |SUNWcvc.u |
+-----------------------------+-----------------------------+
SEE ALSO
svcs(1), svcadm(1M), services(4), attributes(5), smf(5), cvc(7D), cvcredir(7D)
Sun Enterprise 10000 SSP Reference Manual
System Management Services (SMS) Reference Manual
NOTES
The cvcd service is managed by the service management facility, smf(5), under the service identifier:
svc:/system/cvc
Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The ser-
vice's status can be queried using the svcs(1) command.
SunOS 5.10 11 Aug 2004 cvcd(1M)