![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Remove unregconized space from a string | Ricole | UNIX for Dummies Questions & Answers | 3 | 02-29-2008 12:35 AM |
| Storing string with space | rahul303 | Shell Programming and Scripting | 4 | 10-04-2007 07:26 AM |
| Need help to seperate data | getdpg | Shell Programming and Scripting | 4 | 08-30-2006 02:28 AM |
| How to trim the white space around a string in C program | hxm1303 | High Level Programming | 2 | 09-06-2005 12:24 AM |
| row seperate | inquirer | Shell Programming and Scripting | 13 | 08-12-2003 02:26 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Dear Members,
I have string like this string1="file2.txt file4.txt kittu.txt file1.txt" in this i need to cut spaces and take each one has one file output should be --------- fileslist:4 file2.txt file4.txt kittu.txt file1.txt is it possible, please tell me how it possible thanks Krish. |
| Forum Sponsor | ||
|
|
|
|||
|
You had an error because you don't have a file called string1.
try this: Code:
string1="file2.txt file4.txt kittu.txt file1.txt" for i in `echo $string1` do echo $i done Code:
string1="file2.txt file4.txt kittu.txt file1.txt" for i in $string1 do echo $i done |