Hi all!
I am trying to do a script who can do two diferent things depending if something is selected or not.
I am looking a command like the “object exists,” let’s say…
if( something is selected
) {
// do this
} else {
// do this instead
}
I think it could be something like this but is not working
if ( `ls -sl True` ) {
print "something selected";
}
else {
print "nothing selected";
}
I hope some guru of mel can help me with this, I coudn’t find anything on the web
Replies
Here is another one I got that I think is more simple and I like avoiding variables for this:
`ls -sl
`)){
print "yes";
}
else{
print "no";
}