Solved

perl

Posted on 2011-09-29
5
385 Views
Last Modified: 2012-05-12

eval dat="$"${nf}_sw_py_th

if [ x$dat != "x" ]

what is the meaning of above statement in perl ?
0
Comment
Question by:damodar4u
  • 3
  • 2
5 Comments
 

Author Comment

by:damodar4u
ID: 36819072
in that case nf is
nf="tato-matty"
0
 
LVL 31

Accepted Solution

by:
farzanj earned 500 total points
ID: 36819077
Are you sure this is in Perl.  It appears to be Bash (shell scripting).

The if statement is especially in Bash/Ksh.

If statement will be successful (true) if the value of $dat variable is not null.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 36819105
In the first statement, you are trying to form a variable name run time and trying to get the value of that variable.

So

The value of

$tato-matty_sw_py_th

This should be
tato_matty
0
 

Author Comment

by:damodar4u
ID: 36819130
sorry this is not perl... this is shell scripting
0
 
LVL 31

Expert Comment

by:farzanj
ID: 36819143
Yes, I know.  I hope the above answers are making sense.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now