10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi.
If I have a txt file in the following format:
option1=123
option2=abc
option3=321
How do I convert it with KSH into the following format (with the additional prefixed string):
${filename},::option1=123,option2=abc,option3=321
Many thanks (3 Replies)
Discussion started by: user052009
3 Replies
2. Shell Programming and Scripting
:oi was trying to write a script to format output of a command in ksh which has output as below:
so i used :
to get
which i require at all times. But problem occurs when status part changes. above output i get when status is SU (success).If the status is IN (inactive), output of... (1 Reply)
Discussion started by: pr5439
1 Replies
3. Shell Programming and Scripting
Hi All,
I am attempting to create a fixed length tilde delimited file using printf.
The variables are initialized to fixed length blank spaces
a=' '
b=' '
c=' '
d=' '
Sometimes the variable might contain values and sometimes they are... (5 Replies)
Discussion started by: angie1234
5 Replies
4. Shell Programming and Scripting
Hi,
I was trying to format my number like i=1 to 000001 using the below method.
typeset -Z6 i (sorry, corrected)
My shell is K, is not doing, it is supposed to do
Thanks in advance (6 Replies)
Discussion started by: ezee
6 Replies
5. Shell Programming and Scripting
Hi !
How to increment a varibale in ksh.
#!/bin/ksh
set -x
RELEASE_NUM=5.2.103
VAL=0.0.1
RELEASE_NUM=`echo $RELEASE_NUM + $VAL | bc`
echo $RELEASE_NUM
The above code is throwing this error.
+ RELEASE_NUM=5.2.103 (2 Replies)
Discussion started by: dashok.83
2 Replies
6. Shell Programming and Scripting
How do I create a random number between 1 and 10 in kornshell? (2 Replies)
Discussion started by: dangral
2 Replies
7. Shell Programming and Scripting
hi all,
in ksh, how do i format date so it includes hour and minute ?? i am trying the following command :
date +%Om/%Od/%Oy%OH:%M
but it displays the hour and minute concatenated with the day/month/year e.g 12/10/0814:08
when i want the output to be
12/10/08 14:08
i tried... (4 Replies)
Discussion started by: cesarNZ
4 Replies
8. Shell Programming and Scripting
In file.name, I have a line that reads
$IDIR/imgen -usemonths -dropcheck -monitor -sizelimit 80000000 -interval 120 -volcal HSI
How can I get the size limit, i.e. 80000000 out and pass it to a variable called SIZE?
Thanks. I tried
echo "grep sizelimit file.name" | sed -n -e... (3 Replies)
Discussion started by: rodluo
3 Replies
9. UNIX for Advanced & Expert Users
I cannot seem to get this text file to format. Its as if the awk statement is being treated as a simple cat command.
I manned awk and it was very confusing. I viewed previous posts on this board and I got the same results as with the
the awk command statement shown here. Please help.
... (6 Replies)
Discussion started by: tekline
6 Replies
10. Shell Programming and Scripting
Hi,
How to format a number in ksh. For example
x=RANDOM $$
I want x to be of 20 digits long, so if x = 12345 I want it to be left paded with 15 zeros.
Thanks. (2 Replies)
Discussion started by: GNMIKE
2 Replies