The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Having a problem with a FTP Script using perl scottzx7rr Shell Programming and Scripting 6 12-19-2007 06:26 PM
strange net::SFTP Perl module debug entry csgonan Shell Programming and Scripting 2 10-11-2007 06:04 PM
PERL script problem caddyjoe77 Shell Programming and Scripting 5 07-06-2007 02:29 PM
Problem executing setuid script in perl-5.8.6 sarmakdvsr Shell Programming and Scripting 0 08-23-2005 02:11 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-27-2006
vaibhav vaibhav is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 10
Question Perl script strange problem

Hi All,
I have one strange problem in perl script. Bellow is the contents of the script i am trying to write:

#!/usr/local/bin/perl

my $module_list = '';
my @running_module;
my $count=0;
my $flag=0;
my $ccprojecthome=$ENV{CCPROJECTHOME};
@module_list = `cat $ccprojecthome/product/$ENV{CCPROD}/$ENV{CCPRODVER}/config/abp_$ENV{CCPRODVER}_modbo.dat | cut -f2 -d" "`;
$size = @module_list;
print "\n First element $moddule_list[0] \n";
print "\n Lenght of the array $size \n";
@running_proj_list=`cat $ccprojecthome/module/ac/v650/config/module_profile | grep -v PROJ | grep -v Base | cut -f1 -d" "`;
foreach $md (@module_list)
{
print "\n Module $md \n";
@running_proj_list=`/usr/bin/cat $ccprojecthome/module/$md/$ENV{CCPRODVER}/confing/module_profile | grep -v PROJ | grep -v
Base | cut -f1 -d" "`;
if ( $? != 0 )
{
print "Command failed \n";
exit 1;
}
}
print "\n List of projects \n";

print " @running_proj_list ";

now the problem is that when i comment the whole for loop and execute script it will run properly but with for loop it is not working and giving error
please help me to get out of this problem.
  #2 (permalink)  
Old 06-27-2006
cbkihong cbkihong is offline Forum Advisor  
Advisor
  
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,624
What's the error?
  #3 (permalink)  
Old 11-23-2006
vaibhav vaibhav is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 10
Info required for tcsh script

Hi All,

Is it possible to "switch" like this in tcsh?

switch ( "$var" )
case "1" || "2" :
set something
breakesw
case "4" || "5" || "6" :
set otherthing
breakesw
endsw
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:25 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0