![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | 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. Shell Script Page. |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| searching and storing unknown number of lines based on the string with a condition | swamymns | Shell Programming and Scripting | 7 | 05-12-2008 10:02 PM |
| how to seperate space in a string | kittusri9 | Shell Programming and Scripting | 5 | 05-08-2008 03:43 AM |
| sed - searching for string and storing in variable | melias | Shell Programming and Scripting | 4 | 04-12-2008 11:57 AM |
| Remove unregconized space from a string | Ricole | UNIX for Dummies Questions & Answers | 3 | 02-29-2008 12:35 AM |
| Storing space delimited line in var with loop? | eltinator | Shell Programming and Scripting | 2 | 08-23-2007 10:09 PM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Storing string with space
Hi all
I am trying this simple command: a="abc abc" echo $a output is: abc abc But expected output shoould be :abc abc i.e spaces in real string are geting truncated to one space everytime. Plz Help. |
| Forum Sponsor | ||
|
|
|
|||
|
Not working in script!
cat my_file | while read line
do last=`echo $line | cut -c 3-` echo "$last" done my_file: 1US8738297897918[space][space][space]0[space][space]0[space][space]0 1US8738297897918[space][space][space]0[space][space]0[space][space]0 1US8738297897918[space][space][space]0[space][space]0[space][space]0 Expected output: 8738297897918[space][space][space]0[space][space]0[space][space]0 8738297897918[space][space][space]0[space][space]0[space][space]0 8738297897918[space][space][space]0[space][space]0[space][space]0 Current Output: 8738297897918[space]0[space]0[space]0 8738297897918[space]0[space]0[space]0 8738297897918[space]0[space]0[space]0 Plz Help ! |