10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I got the following problem and I wonder if some could please help me out?
I'd like to replace character 8 - 16 , 16 - 24
cat file
... (2 Replies)
Discussion started by: stinkefisch
2 Replies
2. Shell Programming and Scripting
Hello,
I have a requirement to replace the whole string with first occurence of value of a key-value pair.
I have to do this inside awk, as the data I need to work is inside an awk loop.
value of my variable(say LogText) looks like:
LogText=
date=04Mar message=hello1 name=caq... (4 Replies)
Discussion started by: cool.aquarian
4 Replies
3. Shell Programming and Scripting
I have a requirement as below.
In one of my column, I have data which may or may not be separted with coma always. Now I need to validate the length of these text within the coma (if available) and if the length is more than 30 characters, I need to insert a coma either at 30 characters if its... (3 Replies)
Discussion started by: aramacha
3 Replies
4. Shell Programming and Scripting
Hi guyz i want to know nth position of character in string. For ex.
var="UK,TK,HK,IND,AUS"
now if we see 1st occurance of , is at 3 position, 2nd at 6,..4th at 13 position.
1st position we can find through INDEX, but what about 2nd,3rd and 4th or may be upto nth position. ?
In oracle we had... (2 Replies)
Discussion started by: Jonty Immortal
2 Replies
5. Shell Programming and Scripting
I would like to replace /n with ',' and after replace remove last semicolon then put a open brace in starting and closing brace in end of line. See below example:
input:
1234
3455
24334
234
output:
('1234,'3455',24334','234')
Thanks (3 Replies)
Discussion started by: anupdas
3 Replies
6. Emergency UNIX and Linux Support
I want to replace 150th character of all the lines in a file using sed or awk...
searched the forums but didn't find exact answer (9 Replies)
Discussion started by: greenworld123
9 Replies
7. UNIX for Dummies Questions & Answers
Hi guys,
I like to find the Line number of Nth Occurence of a Search string in a file.
If possible, if it will land the cursor to that particualar line will be great.
Cheers!! (3 Replies)
Discussion started by: mac4rfree
3 Replies
8. Shell Programming and Scripting
Hi
for eg my file has:
val1 | val2 | val1 | val2 | val1 | val2 | val1 | val2 |
here i need to replace '|' with '|\n' where the occurence of '|' is divisble by 2
so that the output comes like this
val1 | val2 |
val1 | val2 |
val1 | val2 |
val1 | val2 |
Requesting suggestions in... (1 Reply)
Discussion started by: raghav288
1 Replies
9. Shell Programming and Scripting
I need to find the index of last '|' (highlighted in bold) in awk :
|ifOraDatabase.Lastservererr<>0then|iferr_flag<>0then|end if
Please suggest a way... Thanks (5 Replies)
Discussion started by: joyan321
5 Replies
10. UNIX for Dummies Questions & Answers
Hi all,
If you look at the example below,I want to replace the 21st character (,) with a period (.). I have 1000 records in a file can someone help me how to do that. Thankyou all in advance.
"2008-07-15... (3 Replies)
Discussion started by: blackhawk_123
3 Replies