10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
balajesuri and durden_tyler, I have found your perl script for the thread https://www.unix.com/shell-programming-scripting/176370-perl-script-help-me-extracting-string.html, but find it difficult to understand the syntax.
Could you or any forum members kindly shed some light on the logic... (3 Replies)
Discussion started by: royalibrahim
3 Replies
2. Shell Programming and Scripting
Hi,
I have a file which has some 50 hosts, I want to login to each host using ssh and execute any command. I am using fork function in perl. I am able to login to each host and execute the command in the hosts paralelly, but it spawing/forking 50 processes at a time.
It will consume the cpu... (5 Replies)
Discussion started by: Anjan1
5 Replies
3. Shell Programming and Scripting
Can someone tell me perl fork example please. I tried online but could not get proper documentation. (2 Replies)
Discussion started by: Anjan1
2 Replies
4. UNIX for Dummies Questions & Answers
Its great someone provided this script that strips out a filename and extension but can someone explain how each line works?
file1='Jane Mid Doe.txt'
newfile='Jane.txt'
1) ext=${file1##*.}
2) filename=${file%%.???}
3) set -- $filename
4) newfile="1.$extension" (1 Reply)
Discussion started by: Lillyt
1 Replies
5. Homework & Coursework Questions
I have the following piece of codes. Please explain it to me in great detail how are these codes working.
1. #include <stdio.h>
int main(){
int x;
x=0;
while (x<2 && fork()){
if (!fork()) execlp("echo","x++","x",0);
x++;
system("echo x+x");
}
}
2.
#include <stdio.h>
int i;... (1 Reply)
Discussion started by: prakashabii
1 Replies
6. Shell Programming and Scripting
Hi,
I have doubt regarding the Anonymous hash. For creating a object we are generally using Anonymous hash.
My Doubt is:
Why we are only using Anonymous hash?? Instead of Anonymous hash can we use global hash variable and take its reference for creating an object using same bless function??... (0 Replies)
Discussion started by: jatanig
0 Replies
7. Shell Programming and Scripting
Hi, I want to exec three different functions in perl one per fork();
How can I determine that this it the third fork and I should use third function in it.
if ($pid = 0) { first();}
else (
#parent
second();
)
How to run third function? (1 Reply)
Discussion started by: mirusnet
1 Replies
8. UNIX and Linux Applications
Hi am having a c pgm. It has the include files (unistd.h,sys/types.h,win.h,scr.h,curses.h,stdarg.h and color.h). I don't know the purpose of these include files. will u plz explain me. (1 Reply)
Discussion started by: Mari.kb
1 Replies
9. Shell Programming and Scripting
how does below tr command replace nonletters with newlines?
I think I understand tr -cs '\n' part.. but what is
A-Za-z\' <--- what is this??
tr -cs A-Za-z\' '\n' |
-c --complement
-s, --squeeze-repeats
replace each input sequence of a repeated character that is... (0 Replies)
Discussion started by: convenientstore
0 Replies
10. Shell Programming and Scripting
I have never coded in perl before (just started today morning :). I need to write a perl program to automate a task.
Here is how I do it manually:
Start a program in my home dir. Now if I want to execute another program while this one is still running, what I would do is go to another... (6 Replies)
Discussion started by: the_learner
6 Replies