Sponsored Content
Full Discussion: Problem understanding Paths
Top Forums UNIX for Dummies Questions & Answers Problem understanding Paths Post 302646927 by Scrutinizer on Saturday 26th of May 2012 02:08:38 PM
Old 05-26-2012
Found a couple:
Code:
IFS-":"                     # => should be IFS=":"
if [ -x $direcotry/$cmd ]   # => if [ -x $directory/$cmd ]
retval =0                   # => should be retval=0
if [ "$var" != ""] ; then   # => if [ "$var" != "" ] ; then

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

paths

Hi there! People, i'm a new unix user, and i'm having some problems... I'm updating some scripts (korn shell) in different servers. I use telnet to access these servers and emacs to write the scripts. One of them is an HP, and there´s no problem. But the other one is an AIX, and when i call... (1 Reply)
Discussion started by: caiohn
1 Replies

2. Filesystems, Disks and Memory

having problem in understanding namei module

can anyone give me some idea on unix filesystem namei's algorithsm (2 Replies)
Discussion started by: kangc
2 Replies

3. Shell Programming and Scripting

egrep understanding problem

Hi, Can anyone please let me know the meaning of this line,i am not able to understand the egrep part(egrep '^{1,2}).This will search for this combination in beginning but what does the values in {}signifies here. /bin/echo $WhenToRun | egrep '^{1,2}:$' >/dev/null (1 Reply)
Discussion started by: namishtiwari
1 Replies

4. AIX

Problem in understanding the output of errpt -d H -T PERM -s `date +"%m%d%H00%y"`

Its very critical and 'm in need to schedule this on my crontab so that the output can be monitored by a tool I have written the command below to redirect the error which has the output redirected to the file gincle_lol.log. Code: echo "---" >>/gingle/gincle_lol.log date... (0 Replies)
Discussion started by: Sounddappan
0 Replies

5. Shell Programming and Scripting

problem in understanding the output of errpt -d H -T PERM -s `date +"%m%d%H00%y"`

Its very critical and 'm in need to schedule this on my crontab so that the output can be monitored by a tool I have written the command below to redirect the error which has the output redirected to the file gincle_lol.log. echo "---" >>/gingle/gincle_lol.log date... (1 Reply)
Discussion started by: Sounddappan
1 Replies

6. Shell Programming and Scripting

Problem with the shell script for understanding

Can Anybody please tell me the meaning of the script: #!/bin/sh str=$@ echo $str | sed 's/.*\\//' exit 0 (6 Replies)
Discussion started by: nixhead
6 Replies

7. Shell Programming and Scripting

Problem in understanding export uses

i am beginner in shell scripting. not able to understand what below line will do. PS1=${HOST:=´uname -n´}"$ " ; export PS1 HOST below is the script #!/bin/hash PS1=${HOST:=´uname -n´}"$ " ; export PS1 HOST ; echo $PS1 and i getting the below output ´uname -n´$ (25 Replies)
Discussion started by: scriptor
25 Replies

8. Shell Programming and Scripting

Problem on understanding the regexp command

Hi all, I'm not clear of this regexp command: regexp {(\S+)\/+$} $String match GetString From my observation and testing, if $String is abc/def/gh $GetString will be abc/def I don't understand how the /gh in $String got eliminated. Please help. Thanks (2 Replies)
Discussion started by: mar85
2 Replies

9. Shell Programming and Scripting

Problem in understanding debugging

Hi i was going through the script debugging technique. below example was given in the book. 1 #!/bin/sh 2 3 Failed() { 4 if ; then 5 echo "Failed. Exiting." ; exit 1 ; 6 fi 7 echo "Done." 8 } 9 10 echo "Deleting old backups,... (11 Replies)
Discussion started by: scriptor
11 Replies

10. Shell Programming and Scripting

Problem with (Understanding) function

I have this code #!/bin/bash LZ () { RETVAL="\n$(date +%Y-%m-%d_%H-%M-%S) --- " return RETVAL } echo -e $LZ"Test" sleep 3 echo -e $LZ"Test" which I want to use to make logentrys on my NAS. I expect of this code that there would be output like 2017-03-07_11-00-00 --- Test (4 Replies)
Discussion started by: matrois
4 Replies
Qpsmtpd::Command(3pm)					User Contributed Perl Documentation				     Qpsmtpd::Command(3pm)

NAME
Qpsmtpd::Command - parse arguments to SMTP commands DESCRIPTION
Qpsmtpd::Command provides just one public sub routine: parse(). This sub expects two or three arguments. The first is the name of the SMTP command (such as HELO, MAIL, ...). The second must be the remaining of the line the client sent. If no third argument is given (or it's not a reference to a CODE) it parses the line according to RFC 1869 (SMTP Service Extensions) for the MAIL and RCPT commands and splitting by spaces (" ") for all other. Any module can supply it's own parsing routine by returning a sub routine reference from a hook_*_parse. This sub will be called with $self, $cmd and $line. On successfull parsing it MUST return OK (the constant from Qpsmtpd::Constants) success as first argument and a list of values, which will be the arguments to the hook for this command. If parsing failed, the second returned value (if any) will be returned to the client as error message. EXAMPLE
Inside a plugin sub hook_unrecognized_command_parse { my ($self, $transaction, $cmd) = @_; return (OK, &bdat_parser) if ($cmd eq 'bdat'); } sub bdat_parser { my ($self,$cmd,$line) = @_; # .. do something with $line... return (DENY, "Invalid arguments") if $some_reason_why_there_is_a_syntax_error; return (OK, @args); } sub hook_unrecognized_command { my ($self, $transaction, $cmd, @args) = @_; return (DECLINED) if ($self->qp->connection->hello eq 'helo'); return (DECLINED) unless ($cmd eq 'bdat'); .... } perl v5.14.2 2009-04-02 Qpsmtpd::Command(3pm)
All times are GMT -4. The time now is 07:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy