10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
HI All, I am new in shell scripting ,can any one please help me to convert this scripts from Perl to Shell.
Thank in advance.
$customer=$ARGV;
$rows=`hadoop fs -ls /ncip/$customer/|wc -l`;
if($rows==3){
print "$customer directory exists , cleaning up ! \n";
`hadoop fs -rm... (1 Reply)
Discussion started by: Atul301
1 Replies
2. Shell Programming and Scripting
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies
3. Shell Programming and Scripting
Hi
I am a novice in scripting .Please help me converting perl script into shell
my ($ref) = shift;
my $id;
my $cnt=0;
my $first =0;
my $filename ;
my $filename1 ;
FOREACH:foreach my $r (qw(RET LSH PDM )) {
$ref->{$cnt}->{num_errors} =0;
$ref->{$cnt}->{num_warnings} =0;... (2 Replies)
Discussion started by: apassi
2 Replies
4. Shell Programming and Scripting
#!/usr/bin/perl
#**************************************************************
#
# PERL SCRIPT
# This script restarts the Application
#
#
##**************************************************************
$ENV{'IFS'} = ' ';
#open(STDERR,">&STDOUT");
#select... (2 Replies)
Discussion started by: srikoundinya
2 Replies
5. Shell Programming and Scripting
Hello,,I have a very small script that contains these lines; and it works perfectly; however I need to use Perl now as I will need to feel variables from a MySQL table into this; to it would be nice to start by converting this first...
find / -perm 777 \( -type f -o -type d \) -exec ls -lid {}... (1 Reply)
Discussion started by: gvolpini
1 Replies
6. Shell Programming and Scripting
Hi is there a way that i can convert this simple perl program into shell script
#!usr/bin/perl -w
use strict;
use warnings;
open INPUTFILE, "uniqprobecoordinates.out" || die "canot open the file $!";
open OUTPUTFILE, ">", "1_4reads.out";
while(<INPUTFILE>)
{
chomp;
... (3 Replies)
Discussion started by: bhargavpbk88
3 Replies
7. Shell Programming and Scripting
Hi all,
Not sure if this should be in the programming forum, but I believe it will get more response under the Shell Programming and Scripting FORUM.
Am trying to write a customized df script in Perl and need some help with regards to using arrays and file handlers.
At the moment am... (3 Replies)
Discussion started by: newbie_01
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a problem I don't understand with fuser.
I launch a simple shell script mysleep.sh:
I launch the command fuser -fu mysleep.sh but fuser doesn't return anything excepted:
mysleep:
Then I modify my script switching from #!/bin/sh to #!/bin/ksh
I launch the command fuser -fu... (4 Replies)
Discussion started by: Peuj
4 Replies
9. Shell Programming and Scripting
Okay, so I have two "Hello, world!" scripts, "test.pl" and "test.sh".
#!/bin/perl -w
use strict;
print "Hello, world!\n";
#!/bin/csh
echo Hello,\ world!
When I run test.pl, it runs instantly, always. When I run test.sh, it takes anywhere between 4 and 22 seconds!
I'd like to know what... (3 Replies)
Discussion started by: acheong87
3 Replies
10. Shell Programming and Scripting
Hello All. I am very new to Linux and I am currently interning. I have been working on a project for 2 weeks now and I have had no success. I have to convert bash shell into perl to decrypt and store files. Here is the code in Linux and Bash. Any help would be greatly appreciated.
$... (0 Replies)
Discussion started by: freak
0 Replies