10 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
I have Index Line and I tried to get the 9th character from the file and to check the character is "|" or not.
Shell Scripting.
Sample Index file.
"91799489|K8E|188.004.A.917994892.1099R.c.01.pdf|2013|10/15/2014|002|B|C|C"... (3 Replies)
Discussion started by: pavand
3 Replies
2. Shell Programming and Scripting
Using Awk, how can I achieve the following?
I have set of record numbers, for which, I have to replace the nth field with some values, say spaces.
Eg:
Set of Records : 4,9,10,55,89,etc
I have to change the 8th field of all the above set of records to spaces (10 spaces).
Its a delimited... (1 Reply)
Discussion started by: deepakwins
1 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
Hi,
I have a requirement to search for a pattern in each line in a file and remove the in between words till the 3rd occurrence of double quote (").
Ex: CREATE TABLE "SCHEMANAME"."AMS_LTV_STATUS"
(Note: "SCHEMANAME" may changes for different schemas. Its not a fixed value)
I need to... (2 Replies)
Discussion started by: satyaatcgi
2 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. Shell Programming and Scripting
Is there an awk script that can easily perform the following operation?
I have a data file that is in the format of
1944-12,5.6
1945-01,9.8
1945-02,6.7
1945-03,9.3
1945-04,5.9
1945-05,0.7
1945-06,0.0
1945-07,0.0
1945-08,0.0
1945-09,0.0
1945-10,0.2
1945-11,10.5
1945-12,22.3... (3 Replies)
Discussion started by: ncwxpanther
3 Replies
8. Shell Programming and Scripting
I have an awk script to find the maximum value of the 2nd column of a 2 column datafile, but I need to find the top 5 maximum values of the 2nd column.
Here is the script that works for the maximum value.
awk 'BEGIN { subjectmax=$1 ; max=0} $2 >= max {subjectmax=$1 ; max=$2} END {print... (3 Replies)
Discussion started by: ncwxpanther
3 Replies
9. 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
10. UNIX for Dummies Questions & Answers
How to I get the nth character from a string in shell script. For instance, I have a string London. I want to get, say the first character (L) from the string. How do I do this in unix shell?
Thankx (4 Replies)
Discussion started by: toughman
4 Replies