10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i have a snippet from server log delimited by forward slash.
/a/b/c/d/filename
i need to cut until last delimiter. So desired output should look like:
/a/b/c/d
can you please help?
Thanks in advance. (7 Replies)
Discussion started by: alpha_1
7 Replies
2. 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
3. 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
4. Shell Programming and Scripting
Hello everyone,
Maybe somebody could help me with an awk script.
I have this input (field separator is comma ","):
547894982,M|N|J,U|Q|P,98,101,0,1,1
234900027,M|N|J,U|Q|P,98,101,0,1,1
234900023,M|N|J,U|Q|P,98,54,3,1,1
234900028,M|H|J,S|Q|P,98,101,0,1,1
234900030,M|N|J,U|F|P,98,101,0,1,1... (2 Replies)
Discussion started by: Ophiuchus
2 Replies
5. Shell Programming and Scripting
Dear all,
I am working with names and I have a large file of names in which some words are written together (upto 4 or 5) and their corresponding single forms are also present in the word-list.
An example would make this clear
annamarie
mariechristine
johnsmith
johnjoseph smith
john
smith... (8 Replies)
Discussion started by: gimley
8 Replies
6. Shell Programming and Scripting
Hello,
I have a complex problem. I have a file in which words have been joined together:
Theboy ranslowly
I want to be able to correctly split the words using a lookup file in which all the words occur:
the
boy
ran
slowly
slow
put
child
ly
The lookup file which is meant for look up... (21 Replies)
Discussion started by: gimley
21 Replies
7. Shell Programming and Scripting
Hi,
I am trying to split the words having the delimiter as colon ';' in to separate files using awk.
Here's my code.
echo "f1;f2;f3" | awk '/;/{c=sprintf("%02d",++i); close("out" c)} {print > "out" c}'
echo "f1;f2;f3" | awk -v i=0 '/;/{close("out"i); i++; next} {print > "out"i}'
But... (4 Replies)
Discussion started by: royalibrahim
4 Replies
8. Shell Programming and Scripting
Hi,
I have a string like this in a file,
I want to retrive the words separated by comma's in 3 variables. like
How do i get that.plz advice (2 Replies)
Discussion started by: suresh_kb211
2 Replies
9. 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
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