![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to trim the white space around a string in C program | hxm1303 | High Level Programming | 18 | 10-17-2008 11:43 AM |
| Remove unregconized space from a string | Ricole | UNIX for Dummies Questions & Answers | 3 | 02-29-2008 04:35 AM |
| Storing string with space | rahul303 | Shell Programming and Scripting | 4 | 10-04-2007 11:26 AM |
| Need help to seperate data | getdpg | Shell Programming and Scripting | 4 | 08-30-2006 06:28 AM |
| row seperate | inquirer | Shell Programming and Scripting | 13 | 08-12-2003 06:26 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | 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. |
|
||||
|
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 or just Code:
string1="file2.txt file4.txt kittu.txt file1.txt" for i in $string1 do echo $i done |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|