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
I am having trouble re-writing this sed code
sed -nr 's/.*del(+)ins(+).*NC_0{4}(+).*g\.(+)_(+).*/\3\t\4\t\5\t\1\t\2/p' C:/Users/cmccabe/Desktop/Python27/out_position.txt > C:/Users/cmccabe/Desktop/Python27/out_parse.txt in perl Basically, what the code does is parse text from two fields... (12 Replies)
Discussion started by: cmccabe
12 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
Hi,
Can someone convert the code into perl ?
x=(a b c)
y=(d e)
times=$((${#x} * ${#y}))
((xi=yi=0))
for((i=1;i<=times;i++,xi++,yi++))
do
if((xi>${#x}-1));then xi=0;fi
if((yi>${#y}-1));then yi=0;fi
print ${x},${y}
done (4 Replies)
Discussion started by: giri_luck
4 Replies
5. Shell Programming and Scripting
Hi,
i want to convert number 5860533159 to hexadecimal. i need to use perl.
i used
$foo = 5860533159;
$hexval3 = sprintf("%#x", $foo);
i am getting value as 0xffffffff.
i need to get value as 0x15D50A3A7. when i converted using google calculator, i got the correct value, expected... (9 Replies)
Discussion started by: asak
9 Replies
6. 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
7. Shell Programming and Scripting
Hi ,
I am trying to convert the below code embedded in a csh script to Perl.
Can any expert give me some advice on this ?
sed -n ''"$start_line"',$ p' $tester_dir/nfiles_extracted.txt|cut -c1-4,6-|/bin/perl $test_summary/compare_for_all
_Duts.pl|sort > $tester_dir/nfiles_extracted1.txt (0 Replies)
Discussion started by: Raynon
0 Replies
8. Shell Programming and Scripting
Hello,
Can any perl experts help me convert my sed string to perl. I am unsuccessful with this.
I have to remove this string from html files OAS_AD('Top');
I have come up with this. However the requirement is in perl.
for find in $(find . -type f -name "file1.html") ; do cat $find |... (2 Replies)
Discussion started by: abacus
2 Replies
9. Shell Programming and Scripting
Good afternoon to you all
I really need your help
I have the following script developed in .sh and I need to convert it into perl. Can someone help me do it please?
Here´s the script:
##############################################
##############################################
... (3 Replies)
Discussion started by: zarahel
3 Replies
10. Shell Programming and Scripting
can any body translate the follwing script into one that works in bash?
#!/usr/bin/perl
# classify_books.pl
my $csv_file = shift;
my %categories = ( 'childrens' => 'childrens_books.txt',
'horror' => 'horror_books.txt',
'sports ' =>... (3 Replies)
Discussion started by: ferrycorsten73
3 Replies