10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I want to write a bash script in which a function needs to be called based on its first character in a supplied string. eg function "j" should be called when "jab" or "jgh" or "j" .... etc is hit. I have used complete -F in below script, however here function is invoked... (1 Reply)
Discussion started by: temp.sha
1 Replies
2. UNIX for Advanced & Expert Users
Hi All,
I have a file which is like below. I need to read all the patterns that starts with P and then replace the 9 digit values to 8 digit values (remove leading integer). Can you please help
Example : ( Please look below File)
File :
P,1
M1,... (7 Replies)
Discussion started by: arunkumar_mca
7 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I've got a file like this:
22 22:35645163:T:<CN0>:0 0 35645163 T <CN0>
22 rs140738445:20902439:TTTTTTTG:T 0 20902439 T TTTTTTTG
22 rs149602065:40537763:TTTTTTG:T 0 40537763 T TTTTTTG
22 rs71670155:50538408:TTTTTTG:T 0 50538408 T TTTTTTG... (3 Replies)
Discussion started by: zajtat
3 Replies
4. Shell Programming and Scripting
Hi,
I need help with one problem, I came across recently.
I have one input file which I need to delimit based on character length.
$ cat Input.txt
12345sda231453
asd760kjol62569
sdasw4g76gdf57
And, There is one comma separated file which mentions "start of the field" and "length... (6 Replies)
Discussion started by: Prathmesh
6 Replies
5. Shell Programming and Scripting
Hi,
I want to be able to sort/print a hash based on the string length of the values.
For example
%hash = (
key1 => 'jeri',
key2 => 'corona',
key3 => 'una,
);
I want to be able to print in the following order (smallest to largest)
una,jeri,corona
OR... (1 Reply)
Discussion started by: jdilts
1 Replies
6. Shell Programming and Scripting
Hi,
I hope someone can share there scripting fu on my problem,
I would like to delete the 3rd character from a random length of string starting from the end
Example
Output
Hope you can help me..
Thanks in advance.. (3 Replies)
Discussion started by: jao_madn
3 Replies
7. Shell Programming and Scripting
All,
I can't seem to find exactly what I'm looking for, and haven't had any luck patching things together.
I need to look through a file, and if the record length is not 874, then add 'E' in position 778.
Your help is greatly appreciated. (4 Replies)
Discussion started by: CutNPaste
4 Replies
8. Shell Programming and Scripting
Hi Friends,
I have .txt file which has 13000 records.
Each record is 278 character long.
I am using below code to extract the string and it takes almost 10 minutes.
Any suggestion please.
cat filename.txt|while read line
do
f1=`echo $line|awk '{print substr($1,1,9)}'`
f2=`echo... (6 Replies)
Discussion started by: ppat7046
6 Replies
9. UNIX for Dummies Questions & Answers
Hello,
I am new to unix hence struggling with my requirement.
I have a string like :
ECR/CHQ/GBP/12345.out
I need to get only the ECR/CHQ/GBP portion of the string(cut the string based on the third occurrence of / )...How do it do it?
Many thanks (3 Replies)
Discussion started by: valluvan
3 Replies
10. Solaris
Hi all,
I have file having 4 coulmn like
9246309198,406655682,400009246309198
9246309198,9246309198,400009246309198
9246309198,9246309198,400009246309198
9246309198,9246309198,400009246309198
9246309198,406655682,400009246309198
9246309198,9246309198,400009246309198
I want to valid... (4 Replies)
Discussion started by: salaathi
4 Replies