The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
find command in while loop - how to get control when no files found? mavsman Shell Programming and Scripting 3 04-03-2008 12:44 PM
find common elements in 2 files (for loop) ibking Shell Programming and Scripting 4 12-11-2007 04:51 PM
Find fields with no spaces in value alfredo123 UNIX for Dummies Questions & Answers 10 04-18-2007 07:14 PM
For Loop with find kadishmj Shell Programming and Scripting 4 05-17-2005 10:42 PM
Strip leading and trailing spaces only in a shell variable with embedded spaces jerardfjay Shell Programming and Scripting 6 03-07-2005 02:24 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-22-2008
mronsman mronsman is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 2
For loop using find with file name spaces

Hello All,

This question is actually for the service console of VMware ESX 3.5 but is relevant to this forum I think. I have been advised to use the following commands:

for i in `find /vmfs/volumes/Test_VMFS/ -name "*.vmx"`
do
echo "$i"
#sed -i 's/scsi1:0.present = "true"/scsi1:0.present = "false"/g' "$i"
done

This works to modify that line in all the .vmx files that do NOT contain spaces in their path. But the ones that do fail. It has to do with the way that the FOR command reads in the variable. I have seen some posts on using the while command but I am unable to translate it into what I need. Plus I am not sure if VMware uses the while command from the Service Console. Any help would be much appreciated!

Thanx,
Matt
 

Bookmarks

Tags
for loop with spaces, solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:17 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0