Search Results

Search: Posts Made By: looza
5,541
Posted By looza
fork and exec
I need to ssh to a remote server and run my script there. This is my script.

$ssh = "ssh username@host";
$cmd = "$ssh 'cd <my dir> && < sudo Run_exe>'";

my $pid = fork;
if ($pid == 0){
...
1
1,689
Posted By looza
Error!
#!/usr/local/bin/perl -w


system "ls -iR del-dir > temp";

# Check if entry in hash. If yes, store filename in array

open(INO_FNAME, "temp")|| die "File doesnt exist!" ;
open(FNAMES,...
1,749
Posted By looza
the $rsh, $ssh contains that. for instance, ...
the $rsh, $ssh contains that. for instance,
$ssh="ssh $USER@$HOST";
1,749
Posted By looza
$ssh contains the command that connects the...
$ssh contains the command that connects the client with the remote host.
system ("$ssh '$perf_stats' < temp_pipe 2>&1 &");

I then use something like this:
system("$rsh '$cmd'" );

where $rsh...
1,749
Posted By looza
what is wrong with this line?
system ("$ssh '$perf_stats' < temp_pipe 2>&1 &");

I need to start and interact with my executable defined by perf_stats on a remote machine but not change my command line to that of the remote...
2,077
Posted By looza
starting an executable..
I need a perl script that needs to start an executable in a different shell so that I can use this to run more commands from my script. This is what I have:

my $USER = "my_user_name";
mu $HOST =...
5,269
Posted By looza
I need to know the complete path (directory and...
I need to know the complete path (directory and the filename) to those files whose inodes match a given set of values. Hence if the inodes match a value defined in a hashtable, I need the name of the...
5,269
Posted By looza
That works great! I need to use this in a Perl...
That works great!
I need to use this in a Perl script, where I store the ls -iR output in a file and parse that file. If the line contains a directory, store it in a variable. If its a file name...
5,269
Posted By looza
parsing output
I have a file that contains the output of the ls -iR command, something like this:



./results:
2504641011 result_1410 2500957642 result_525
2504641012 result_1425 2500957643...
7,173
Posted By looza
works! Thanks!!!
works!

Thanks!!!
6,405
Posted By looza
rsh in Perl
How can I use the rsh command in perl?
I need to rsh to a machine, change directory and run a C program there.
I have something like this:
$USER="username";
$MY_DIR="\t\home\"...
7,173
Posted By looza
perl: Assigning array values..
I have to add a variable value to an array, something like this:

......
@my_array_name = $value_of_this_variable;

This doesnt seem to work, any ideas why?

Thanks!
2,004
Posted By looza
$I_FILE="ifile"; where ifile looks like this ...
$I_FILE="ifile";
where ifile looks like this
4294967295,0,3,2103159,54668771,54668771,0,1,566547,8770,0,384,228,18,12
4294967295,0,4,2103160,54668772,54668772,0,1,566548,8770,0,384,228,18,12...
2,004
Posted By looza
sorry this: ***** I get: 4096045055 ...
sorry this:
*****
I get:
4096045055

*****

was from another stray print command, irrelevant here.
2,004
Posted By looza
Whats wrong with this line?
I have a file $I_FILE that I need to filter and store the 1st and the 9th columns in another file $O_FILE.
With this in Perl,

system ("awk -F, '{print \$1, \$9}' \$I_FILE | sed '\/^\$\/d' >...
3,160
Posted By looza
Even better! Thanks!!
Even better!

Thanks!!
3,160
Posted By looza
script to delete files
I have 1000 directories named: 0 - 999 which should contain 1000 files named 0 - 999. But some of these directories contain file whose names are greater than 999 and I need to delete those. I wrote...
9,138
Posted By looza
Got it. The difference was because I was using...
Got it. The difference was because I was using Csh. It works fine in bash. This explains more: Csh Programming Considered Harmful (http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/)

Thanks for...
9,138
Posted By looza
That gives: [my-linux ~/]$ dd if=/dev/zero...
That gives:

[my-linux ~/]$ dd if=/dev/zero of=deleteme bs=4096 count=1 2>/dev/null
dd: unrecognized option `2'
9,138
Posted By looza
I tried this: dd if=/dev/zero of=deleteme...
I tried this:
dd if=/dev/zero of=deleteme bs=4096 count=1 > /dev/null

that doesnt help
9,138
Posted By looza
dd command
Hi!

Is there a way I can use the dd command without seeing the messages:
1+0 records in
1+0 records out

Thanks!!
2,569
Posted By looza
run script for given time
Hi!

I need to run my script for a specific number of time, as specified by the user: For instance, if the user specified 10, my script should run for until 10 seconds expire. How do I do this?
3,445
Posted By looza
Accessing variables of one shell script in another shell script
I have a variable $exe in a shell script file a.sh which I need to access in another shell script file b.sh. How can I do that? :rolleyes:

Thanks!!
Showing results 1 to 23 of 23

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