It sounds so easy to do.
I have a file thats laid out like this..
number text text text text (etc about 15 times with various text fields)
I want to take the first field, "number", subtract 100 from it, and then put it back in the file. a simple little manipulation of the first field in... (4 Replies)
Hello,
I have a korn shell string variable
str1 = "A,B,Z"
I would like to create another korn shell string variable
str2 = "letter = 'A' or letter = 'B' or letter = 'Z' "
Please help!
Thanks in advance
an UNIX newbie! (13 Replies)
Hey Guys,
Right i know how to alter a word to begin with a capital letter, i know how to remove unwanted characters and replace them with the relevant character however i don't now if there is a way to do them all in one line.
Code:
echo -n ${string:0:1} | tr a-z A-Z #convert first letter... (4 Replies)
if I have two string variable, how do I add one to anther.
like
a= "a"
b="b"
c=$a+$b
but that doesn't work.
Is there anyway to solve it.http://www.qtl.co.il/img/copy.pnghttp://www.google.com/favicon.icohttp://www.babylon.com/favicon.icohttp://www.morfix.com/favicon.ico (2 Replies)
Write a shell program to display the position of the right - most character in a given input string.
Example :
Input : RAHUL
Output : L is in the 5th position
also tell me how to count length of string and how to find the position of specific character in left most side.
Homework... (0 Replies)
hi all,
i am new to shell scripting and need help.
i have a string that stores the month in Jan/Feb/Mar format. i need to convert it to number like 01 for jan, 12 for dec etc.
i am using the following sed command,
echo "Enter a Month eg. Jan/Feb : "
read MONTHEND
... (9 Replies)
Hello,
I would like to make simple string manipulation but since i am new in shell scripting some strange stuff are uncomprehensible to me:
I would like to pick up the name of a file and put it in a variable:
shadok@computer:~$a= folder/fil*.dat
shadok@computer:~$echo $a... (3 Replies)
i have something like this...
echo "teCertificateId" | awk -F'Id' '{ print $1 }' | awk -F'te' '{ print $2 }'
Certifica
the awk should remove 'te' only if it is present at the start of the string.. anywhere else it should ignore it.
expected output is
Certificate (7 Replies)
Hi ,
I am getting a string like
aaa,bbb,sdsdad,sdfsdf,sdfsdfdsf,rtyrtyr,45654654,ddfdfdfgdfg,dfgdfgdg...........
Now what I need is to format it.
So after each nth comma I need one newline. So the above will look like
when n=3
aaa,bbb,sdsdad,
sdfsdf,sdfsdfdsf,rtyrtyr,... (4 Replies)
I'm making a little game in Perl, and I am trying to remove the first instance of a character in an arbitrary string. For example, if the string is
"cupcakes"and the user enters another string that contains letters from "cupcake" e.g:
"sake"the original string will now look like this (below)... (3 Replies)