The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
running script in cron - with ssh commands - not working frustrated1 Shell Programming and Scripting 31 09-16-2008 11:14 AM
pwd & cd commands not working in shell script perk_bud Shell Programming and Scripting 9 04-07-2008 08:11 AM
How to run unix commands in a new shell inside a shell script? hkapil Shell Programming and Scripting 2 01-04-2006 06:56 AM
differnce between working of at and crontab commands doddas UNIX for Dummies Questions & Answers 2 05-04-2005 04:17 PM
KORN Shell - Spawn new shell with commands frustrated1 Shell Programming and Scripting 2 04-20-2005 03:23 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-25-2008
wrapster wrapster is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 193
How to get shell commands working through ruby?

Hi all,

I am a newbie currently trying to execute shell commands from ruby instead of a shell script.(This method is conceived only for solaris so no issues with porting to other OS and all)
Eg:
Consider the command 'ls"
with a shell script ,I would use it like this
bash# ls
<all the contents in that dir would be displayed>

Now how do i get to do the same with ruby?

I dont want to use methods like recursively searching the directory and then displaying the contents(through some while loop )
It has to be only "ls", as in i need to make "ls" work on solaris through ruby as it would if it were to be written In a shell script?

Thanks
 

Bookmarks

Tags
linux commands, os command, ruby

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 11:48 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