![]() |
|
|
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 |
| sed string manipulation | speedieB | Shell Programming and Scripting | 4 | 11-23-2008 08:27 PM |
| string manipulation | james6 | UNIX for Dummies Questions & Answers | 5 | 06-03-2008 11:05 AM |
| string manipulation | Cactus Jack | Shell Programming and Scripting | 9 | 02-14-2008 01:14 PM |
| String Manipulation | kakashi_jet | Shell Programming and Scripting | 7 | 01-10-2007 01:25 AM |
| string manipulation in C | trinath | High Level Programming | 1 | 01-23-2006 11:13 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi,
I would like to know How to use use sed for manipulating string for the following situation. Basically my objective is to check validity of the filename in my shell script. I am getting a parameter like this for my shell script. Check my folder is having some space. $1=/root/krishna mohan/file.txt I am trying to use sed so that I can mutate the above file path like below and further use ls command. /root/'krishna mohan'/file.txt ls /root/'krishna mohan'/file.txt Ofcourse I do know that I can use single quote in the begining and end.But I will have problems if I am getting above parameter with some mask/pattern like /root/krishna mohan/file*.txt Here keeping single quotes in the begining and end won't work. Kindly suggest me the solution How to keep quotes for any text between / and / which has space. |
|
||||
|
yeah But it is not working in following case..can u pls suggest on this
Here is the input parameter it comes for me. $ ./sample.ksh '/root/krishna mohan/file*.txt' sample.ksh ******** input="$1" ls -m $input ls -m "$input" ********** above command are not able to interpret and list the exact files.. Thanks Krishna |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|