10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: vivek d r
7 Replies
2. Shell Programming and Scripting
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)
Discussion started by: anupom2000
9 Replies
3. UNIX for Dummies Questions & Answers
Dear All,
I have a question.
I have files with the following pattern.>S8_SK1.chr01
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNCAGCATGCAATAAGGTGACATAGATATACCCACACACCACACCCTAACACTAACCCTAATCTAACCCTGGCCAACCTGTTT... (13 Replies)
Discussion started by: pawannoel
13 Replies
4. Shell Programming and Scripting
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. (1 Reply)
Discussion started by: shashwat2691
1 Replies
5. UNIX for Dummies Questions & Answers
I am doing some training for a job I have just got and there is an exercise I am stuck with. I am not posting to ask a question about logic, just a trivial help with string manipulation. I would appreciate if somebody could at least give me a hint on how to do it.
Basically, the intelligent part... (8 Replies)
Discussion started by: Dantastik
8 Replies
6. Shell Programming and Scripting
Hi,
i am just gettin exposed to UNIX.
Could anyone of u help me out with dis problem..?
i have a variable 'act' which has the value as follows,
echo $act gives -0- -0- -----0---- 2008-06-04 -0- -0-
echo "$act" | awk '{print ($act)}'
gives,
-0-
-0-
-----0----
2008-06-04
-0-
-0-
I... (2 Replies)
Discussion started by: jerrynimrod
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a file with rows of text like so :
E100005568374098100000015667
D100005568374032000000112682
H100005228374060800000002430
I need to grab just the last digits(bolded) of each line without the proceeding text/numbers.
Thanks (5 Replies)
Discussion started by: james6
5 Replies
8. Shell Programming and Scripting
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)
Discussion started by: shadow0001
4 Replies
9. Shell Programming and Scripting
Hi There!
I have the following block of text in my input file
and in order to parse it correctly, i need to have
i.e. If a line starts with a number, ignore it else replace it with the number from the previous line until the first ','
So, for example,
15,9:5/12345
,10:1
... (5 Replies)
Discussion started by: orno
5 Replies
10. Shell Programming and Scripting
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)
Discussion started by: hai1973
13 Replies