473,386 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How do I populate array from an string output of a bash string.

I need to split an output from a bash script and populate an array with it. So I can manipulate and print that later. Unfortunately I can not find a way to do that.
so what I have thus far is this:
os.system("script.sh")
this gives me multi line output such as:
server machine name status
I want to put this into an array so I can print it later (although dictionary would be even nicer with custom fields).
Basically i want to later on display this output in fields within a web page table.

Thank you!
Mar 18 '11 #1
0 1449

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Hessam | last post by:
Hello, I am designing a .net custom control in VS.net 7.1 and my control exposes an array of strings which are supposed to be the items to show. To do this have declared a private string variable...
1
by: cmrchs | last post by:
Hi, I have a function that creates an array and want to use that array in the client. but what is the syntax in C++.NET 2005 to specify an array as output param of a function ?? ref class Test...
6
by: moondaddy | last post by:
I'm writing an app in vb.net 1.1 and need to convert a byte array into a string, and then from a string back to a byte array. for example Private mByte() as New Byte(4){11,22,33,44} Now how...
1
by: Allen Maki | last post by:
Why can I get the index of the item of the array when I use string*, but can not get the index of the array when I use any other type (such as Int32)? This code will compile perfectly, but if I...
3
by: edoardo.poeta | last post by:
I'm a dummy. I have a basic knowledge of javascript and I want to split a string, but I receive an error at line 15. Where my error in make the array? Why? Can someone help me to resolve? Thank's....
4
by: Jonathan Wood | last post by:
Is it just me? It seems like one moving from MFC to C# loses some string functionality such as the two mentioned in the subject. Did I miss something? -- Jonathan Wood SoftCircuits...
8
by: David Lazos | last post by:
Hi All, I use Contains method of String object to determine if a string variable has another string, like that. *************************** ipAddress.Contains("127.0.0")...
4
by: Kurien Mathew | last post by:
Hello, What will be a concise & efficient way to convert a list/array.array of n elements into a hex string? For e.g. given the bytes I would like the formatted string 0x74 0x6f 0x6e 0x67...
5
by: da1978 | last post by:
Hi experts, I need to convert a string or a Byte array to a string byte array. Its relatively easy to convert a string to an char array or a byte array but not a STRING byte array. i.e. ...
5
by: bodycode | last post by:
I am writing a dietary application usng Visual C# 2010. I need to output a decimal value that can be truncated to any number of decimal places I want, without rounding at all, on any level. I want...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.