10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
hello,
I had posted earlier help for a script for splitting concatenated words . The script was supposed to read words from a master file and split concatenated words in the slave/input file.
Thanks to the help I got, the following script which works very well was posted. It detects residues by... (14 Replies)
Discussion started by: gimley
14 Replies
3. 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
4. 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
5. UNIX for Dummies Questions & Answers
Hello I need help with the following. I have strings like
#if defined(__def1__)
#if defined(__def1__) || defined(__def2__)
#if defined(__def1__) && defined(__def2__) && defined(__def3__).
#if defined(__def1__) || defined(__def2__) || defined(__def3__).
I need to print what is there in... (4 Replies)
Discussion started by: srk
4 Replies
6. UNIX for Dummies Questions & Answers
Hello all!
I'm trying to put together a small script that will take in a file name and attach a datestamp to the end of it (but before the file type extension).
To illustrate...
Before:
filename.txt
anotherfilename.txt
After:
filename_20090724.txt
anotherfilename_20090724.txt
... (7 Replies)
Discussion started by: jisoo411
7 Replies
7. Shell Programming and Scripting
Let's say I have a very long string with no spaces but just words stored in $very_long_string.
$very_long_string = "aaaaaaaaaaabbbbbbbbbbbccccccccccccdddddddddddd";
I can do this to split the string into 1 character each and store them in an array:
@myArray = split(//, $very_long_string); ... (3 Replies)
Discussion started by: teiji
3 Replies
8. Shell Programming and Scripting
Hi all,
I want to split a string in awk and treat each component seperatley.
I know i can use:
split ("hi all", a, " ")
to put each delimited component into array a.
However when i want to do this with just a string of chars it does not work
split ("hi", a, "");
print a;
prints... (6 Replies)
Discussion started by: pxy2d1
6 Replies
9. Shell Programming and Scripting
Hi,
I am new to shell scripting, Can any body suggest me how I can split a string with a delimiter as whitespace into words and store into a array.
I have read a line from file, now I want to split the line into words and store in a array for further use.
eg : the sky is blue
want... (3 Replies)
Discussion started by: smk
3 Replies
10. Shell Programming and Scripting
Hi,
I have a string like 'xyz' and i want to to split the above string into letters for comparision purpose.
any idea pls.
cheers
RRK. (3 Replies)
Discussion started by: ravi raj kumar
3 Replies