10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a file that has two columns. I first column is an identifier and the second is a column of strings. I want to split the characters in the second column into substrings of length 5. So if the first line of the file has a string of length 10, the output should have the identifier repeated 2... (3 Replies)
Discussion started by: verse123
3 Replies
2. Shell Programming and Scripting
Hi All,
There is a file with a data. If the line is longer than 'n', we splitting the line on the parts and print them. Each of the parts is less than or equal 'n'.
For example:
n = 2;
"ABCDEFGHIJK" -> length 11
Results:
"AB" "CD" EF" GH" "IJ" "K"
Code, but there are some errors.... (9 Replies)
Discussion started by: booyaka
9 Replies
3. Shell Programming and Scripting
A text file has 2 fields (Data, Filename) delimited by # as below,
Data,Filename
Row1 -> abc#Test1.xml
Row2 -> xyz#Test2.xml
Row3 -> ghi#Test3.xml
The content in first field has to be written into a file where filename should be considered from second field.
So from... (4 Replies)
Discussion started by: jayakkannan
4 Replies
4. Shell Programming and Scripting
Hi !
here is my data file column 1 fields
2597
121297
13599
130498
want to print like this
02/05/1997
12/12/1997
13/05/1999
13/04/1998
how to split each field and print in correct way
if there was delimiter I would have done some thing like this
awk '{split($0,a,":");... (13 Replies)
Discussion started by: Akshay Hegde
13 Replies
5. Shell Programming and Scripting
hi
i have a requirement to input a string to a shell script and to split the string to multiple fields,
the string is copied from a row of three columns (name,age,address) in an excel sheet.
the three columns (from excel) are seperated with a tab when pasted in the command prompt, but when the ... (2 Replies)
Discussion started by: midhun19
2 Replies
6. UNIX for Dummies Questions & Answers
Hello guys,
should be a very easy questn for you:
I need to delete strings in file1 based on the list of strings in file2.
like file2:
word1_word2_
word3_word5_
word3_word4_
word6_word7_
file1:
word1_word2_otherwords..,word3_word5_others... (7 Replies)
Discussion started by: roussine
7 Replies
7. Shell Programming and Scripting
Hi,
I have a string like ABC.123.XYZ-A1-B2-P1-C4. I want to delimit the string based on "-" and then get result as only two strings. One with string till last hyphen and other with value after last hyphen... For this case, it would be something like first string as "ABC.123.XYZ-A1-B2-P1" and... (6 Replies)
Discussion started by: gupt_ash
6 Replies
8. Programming
Hi All
I need help writing a Java program to split strings reading from a FILE and writing output into a FILE. e.g.,
My input is :
International NNP
Rockwell NNP
Corp. NNP
's POS
Tulsa NNP
unit NN
said VBDExpected output is:
International I In Int Inte l al... (2 Replies)
Discussion started by: my_Perl
2 Replies
9. Shell Programming and Scripting
Hi,
I just wandering how to split a record which has more than one delimiter,
i have a file which contains pattern as group separtor and ~ as field separtor, Ultimately I need consider even the groups as a field, So i need to make this multi-delimited file into ~ delimited file.
My record... (4 Replies)
Discussion started by: braindrain
4 Replies
10. UNIX for Dummies Questions & Answers
Hi you,
I have the following problem:
I have a string like the followings: '166Mhz' or '128MB' or '300sec' or ...
What I want to do is, I want to split the strings in a part with the numbers and a part with letters.
Since the strings are not allway three digits and than text i couldn't do... (3 Replies)
Discussion started by: bensky
3 Replies