Search Results

Search: Posts Made By: alirezan
6,692
Posted By alirezan
Interesting...something like IPC..eh? but how?...
Interesting...something like IPC..eh? but how? any ideas?

Thanks
6,692
Posted By alirezan
darn,...I just hoped there's a way...like...
darn,...I just hoped there's a way...like adoption or something... :(
6,692
Posted By alirezan
starting a bash session as child process to another bash session from a process
Hi

I want to do something that might sound strange.

I have a code that in written in C and is executed at startup (it's a custom process). It occasionally calls some bash scripts.

The...
7,591
Posted By alirezan
Replace part of a line with sed/awk
Hello

I have a document and in this document I have several occurrence of "VAR == xxxxxxx" and xxxxx can be anything. I don't know what it is. I want to replace the 'xxxxx's with something I...
8,275
Posted By alirezan
don't have nfsd mount point in /proc/fs/nfsd
hi guys

I installed NFS server and everything started out fine but I don't have /proc/fs/nfsd entry and so I can't mount nfsd. Therefore I can't start my nfs service.

Why don't I have...
6,425
Posted By alirezan
awk or sed for finding closest pattern to a line number
hi guys,

I want to do pattern matching with awk or sed but I don't know how. here's what I want:

I have a line number for a pattern that I have already found using grep, and I know a pattern...
2,917
Posted By alirezan
strange behaviour from sed???
Hi all,

I want to do a very simple thing with sed. I want to print out the line number of a disk I have defined in /etc/exports, so I do:



It's all good, but here's the problem. When I...
6,225
Posted By alirezan
Thanks Carl, it works fine! Well, I didn't want...
Thanks Carl, it works fine! Well, I didn't want to use expect because it was only one interaction and expect would have over-complicated things.

Thanks
6,225
Posted By alirezan
RAID setup automation problem
Hi guys,

I'm trying to write a small script that sets up RAID using MDADM without asking user for any input.
Here's what I'm doing:

start=`mdadm --create $2 --level=$3 --raid-devices=$4 $5 $6...
1,288
Posted By alirezan
problems with arrays
Hi guys,

I want to extract the start and end cylinders of each partition from output of "fdisk -l". I tried to dump the info in an array and then extract from there. Here's the code I have written...
13,301
Posted By alirezan
sfdisk for automated partitioning?
Hi guys,

I want to write a script to automate partitioning for some project that I'm working on. I tried using fdisk but it was too painful... so, turned to sfdisk but now I'm getting strange...
Forum: Programming 08-19-2008
32,962
Posted By alirezan
Running shell commands from C/C++
Hi guys,

I know using system() we can run unix commands but the problem is, I can't get any returns with the system(). I am returning stuff from my shell scripts that I need to be able to read...
3,138
Posted By alirezan
Results of command execution into array
Hi

Can anybody tell me how can I dump the results of execution of a command into array form? For example, I want to execute:


and put each part of the result in an array element:


...
2,573
Posted By alirezan
great! Thanks!
great! Thanks!
2,573
Posted By alirezan
returning from a function
Hi all,

I am very new to BASH shell programming. I need to return an integer from a function to the caller function. I did this:




but it keeps giving me wrong return:



Can someone...
2,754
Posted By alirezan
thanks! yeah apparently it is the * ... any way...
thanks! yeah apparently it is the * ... any way to fix this flaw?

Thanks
2,754
Posted By alirezan
Strange results from FDISK?????
Hi all,

I am writing script that returns the size of each disk or partition when called. I am using FDISK -l and parsing the results to get the result I want. When I execute fdisk -l it shows...
1,695
Posted By alirezan
thanks alot! It worked!
thanks alot! It worked!
1,695
Posted By alirezan
How to get rid of extra enter at the end???
Hi guys,

I want to automate a few tasks. For one of them, I need to get the output of a command and parse it to extract information I need: drbdadm create-md drbd0

The output is:

md_offset...
2,687
Posted By alirezan
Alright! Thanks alot! it worked!
Alright! Thanks alot! it worked!
2,687
Posted By alirezan
Bash script undesired output
hi guys,

When for example, I want to get the size of a partition, I have done the following:

# result=`fdisk -l | grep /dev/sda1`
# echo $result
/dev/sda1 1 15000 120487468+ 83 Linux

and...
1,872
Posted By alirezan
How to find out if there's a number at the end of a var
Hi

I want to find whether the argument passed to my script ends in a number or not. Like, I want to find out if the argument is of the form: xyzwpq123 or just of the form xyzwpq.

Can someone...
Showing results 1 to 22 of 22

 
All times are GMT -4. The time now is 01:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy