LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-06-2009, 05:34 AM   #1
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 150

Rep: Reputation: 15
convert dos2unix /opt/SV DC/*.* using system command.Here path is having space.


I want to convert dos2unix all files like *.* using system command.
Here path is having the space.

ex:

char filePath[1024];
memset(filePath, 0, 1024);
_snprintf(filePath,1023,"/usr/bin/dos2unix \"/opt/SV DC/options/*.*\"");
system(filePath);

please give suggestions to solve problem.

ThanQ,
Nagendra R
 
Old 08-06-2009, 06:27 AM   #2
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 150

Original Poster
Rep: Reputation: 15
I got the solution as:


char filePath[1024];
memset(filePath, 0, 1024);
_snprintf(filePath,1023,"/usr/bin/dos2unix \"/opt/SV DC/options\"/*.*");
system(filePath);

Here string quotation(") is added before *.*.

ThanQ,
Nagendra R
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding # /opt/CTEact/bin/act & /opt/SUNWexplo/bin/explorer not available for x86 rajaniyer123 Solaris / OpenSolaris 6 04-24-2008 10:09 AM
How to have a space in a path? xpucto Linux - Newbie 2 01-11-2008 08:54 AM
Use of dos2unix command Karthikeyan Gurusamy Linux - Newbie 3 02-02-2006 07:32 AM
dos2unix command on a folder raghunandan Linux - Software 1 12-12-2005 08:50 AM
error when using a system command to invoke convert nodyl Programming 4 08-25-2004 11:00 PM


All times are GMT -5. The time now is 06:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration