473,394 Members | 1,718 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to split a particular word in to individual characters???

How to split a particular word in to individual characters???

eg: vino as v i n o ...
Sep 10 '07 #1
4 7000
If you have fold and your shell supports process substitution:

Expand|Select|Wrap|Line Numbers
  1. echo $(fold -w1 <(echo "vino"))
  2. v i n o
Sep 10 '07 #2
Hello !

I've tried that command on csh, sh and ksh both on HP UX and on Solaris.

With sh, csh didn't work on both the two systems...It worked with ksh , but ONLY on Solaris.

Why ?

ksh is supposed to be the same shell on HP UX and on Solaris ... so why this different behavior from one system to another?



If you have fold and your shell supports process substitution:

Expand|Select|Wrap|Line Numbers
  1. echo $(fold -w1 <(echo "vino"))
  2. v i n o
Sep 11 '07 #3
Nepomuk
3,112 Expert 2GB
Hello !

I've tried that command on csh, sh and ksh both on HP UX and on Solaris.

With sh, csh didn't work on both the two systems...It worked with ksh , but ONLY on Solaris.

Why ?

ksh is supposed to be the same shell on HP UX and on Solaris ... so why this different behavior from one system to another?
It works fine with bash on Ubuntu Linux...

Greetings,
Nepomuk
Sep 11 '07 #4
Hello !

I've tried that command on csh, sh and ksh both on HP UX and on Solaris.

With sh, csh didn't work on both the two systems...It worked with ksh , but ONLY on Solaris.

Why ?

ksh is supposed to be the same shell on HP UX and on Solaris ... so why this different behavior from one system to another?
Yes,
they may be quite different (ksh88, ksh93, pdksh, dtksh etc.) The process substitution (<(...)) syntax is not standard.

For older shells you can use this one:

Expand|Select|Wrap|Line Numbers
  1. echo `echo "vino"|fold -w1`
Sep 11 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Scot Hacker | last post by:
I have a database that has been populated with content pasted out of MS Word, and is full of special characters -- em dashes, curly quotes, curly apostrophes, etc. Now I'm generating plain text...
0
by: zheetee | last post by:
i am a XML beginner.... how to search a particular word from xml then lists out all the result by using asp,php...+++...... Any search engine....?or script?or... thank you....
5
by: derrick | last post by:
I used to program text RPG's in C back in high school, but I was very crude at it and only learned what I needed to get the job done. I am now about to graduate college with a degree in English and...
15
by: Jeannie | last post by:
Hello group! I'm in Europe, traveling with my laptop, and I don't any compilers other than Borland C++ 5.5. available. I also don't have any manuals or help files available. Sadly, more...
2
by: Larry C | last post by:
Hello, I have an XML doc and I am trying to write a utility thath will allow me to change a particular word with my "title" section of theXML doc. I would like to look for a "word" in the title...
1
by: Luis Esteban Valencia | last post by:
Is it possible to implement mouseover on a particular word in a datagrid (not mouseover on the entire cell)? For instance, assuming tha I have a 'Definitions' MSSQL table as such: Definitions...
3
by: divina11 | last post by:
How do I go through Multiple tables (tables 1-20) to search for a particular word e.g. "first" and then print the results (i.e. table name & column name which contains the word "first"). Not sure...
1
by: avik1612 | last post by:
Hi all, I am trying to write a perl script to find a particular word in all text files in a particular directory and if that particular word is found in that textfile a mail shouldbe send that...
1
by: sury | last post by:
I want to split a word into individual alphabets and substitute a word for each of the alphabets in c#. example: If the word entered is LATE, the output wud be L:London A :Apple T:Tom E:Egg
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.