Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Help understanding what this ls -l command is checking in a script Post 303039854 by Corona688 on Wednesday 16th of October 2019 11:20:14 AM
Old 10-16-2019
Quote:
Originally Posted by MadeInGermany
In a standard shell the status variable is $?
In csh it is $status.
bash is a standard shell, and also has $status as a synonym for $?
Code:
tyler@gentoo ~ $ echo $SHELL
/bin/bash
tyler@gentoo ~ $ echo $status

tyler@gentoo ~ $ echo $?
0
tyler@gentoo ~ $

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need help understanding script command

We use a UNIX-based system (Lawson) at work and I was given this command to request a data extract from the db admin. The only thing I really understand is the last line as it appears to be joining the files created from the first three lines into one. Is there anyone who can help me breakdown the... (4 Replies)
Discussion started by: KGee
4 Replies

2. Shell Programming and Scripting

understanding the sed command

Guys, I am trying to understand the sed command here. adx001 $ a=/clocal/dctrdata/user/dctrdat1/trdroot/recouncil adx001 $ b=`echo $a | sed 's/\//\\\\\//g'` adx001 $ echo $b \/clocal\/dctrdata\/user\/dctrdat1\/trdroot\/recouncil The sed command i took it from the script. Please... (3 Replies)
Discussion started by: mac4rfree
3 Replies

3. Shell Programming and Scripting

understanding the kill command

Hi Guys, I like to know if i have a process which triggers 10 different child processes. How to identify out of the 11 processes running which is the parent process and what are the child process? And if i kill the parent process will the child process be killed.. if not is there a way to... (2 Replies)
Discussion started by: mac4rfree
2 Replies

4. Shell Programming and Scripting

understanding mv command

hi i was moving a file from one directory to another with the following cmmand mv /home/hsghh/dfd/parent/file.txt . while doing so i i accidently mv /home/hsghh/dfd/dfd . although i gave ctrl c and terminate the move command some of the file are missing in the parent directory and... (1 Reply)
Discussion started by: saravanan71184
1 Replies

5. Solaris

Understanding 'du' command

Hi I have a questions related 2 commands : 'du' and 'ls'. Why is the difference between output of 'du' and 'ls' cmd's ? Command 'du' : ------------------ jakubn@server1 /home/jakubn $ du -s * 4 engine.ksh 1331 scripts 'du -s *' ---> shows block count size on disk (512 Bytes... (5 Replies)
Discussion started by: presul
5 Replies

6. Shell Programming and Scripting

Understanding 'find' command

I want to understand what does this command do:confused::confused: find . \( -type f -o -type 1 \) Plz someone explain me ! Thanks much in advance!! (2 Replies)
Discussion started by: sears
2 Replies

7. UNIX for Dummies Questions & Answers

understanding sed command

Hi Friends, I need a small help in understanding the below sed command. $ cat t4.txt 1 root 1 58 0 888K 368K sleep 4:06 0.00% init 1 root 1 58 0 888K 368K sleep 4:06 0.00% init last $ sed 's/*$//' t4.txt 1 root 1 58 0 888K ... (3 Replies)
Discussion started by: forroughuse
3 Replies

8. UNIX for Advanced & Expert Users

Checking missing data's sequence (shell script | UNIX command)

Dear All members, i have some trouble here, i want to ask your help. The case is: I have some data, it's like: -ABCD1234 -ABCD1235 -ABCD1237 -BCDE1111 -BCDE1112 -BCDE1114 there is some missing data's sequence (the format is: ABCD = name 1234 = sequence). I want to print the... (2 Replies)
Discussion started by: septian.tri
2 Replies

9. Shell Programming and Scripting

awk : Need Help in Understanding a command

Hello I am working on a Change request and Stuck at a point. The below awk command is used in the function. float_test ( ) { echo | awk 'END { exit ( !( '"$1"')); }' } I understand that awk 'END' is used to add one line at the end and exit is used to end the script with an error... (4 Replies)
Discussion started by: rahul2662
4 Replies

10. Shell Programming and Scripting

Command script for checking a file existence

Hello, I have a directory where sometimes appear a certain file name - and I'd like to be notified by email when that happens... so what command or script I may use? e.g. if there's a file named "adam" in the directory named "dir1" then send a mail to "abc@abc.com".. it needs to permanently... (5 Replies)
Discussion started by: netrom
5 Replies
IMAP_STATUS(3)								 1							    IMAP_STATUS(3)

imap_status - Returns status information on a mailbox

SYNOPSIS
object imap_status (resource $imap_stream, string $mailbox, int $options) DESCRIPTION
Gets status information about the given $mailbox. PARAMETERS
o $ imap_stream -An IMAP stream returned by imap_open(3). o $mailbox - The mailbox name, see imap_open(3) for more information o $options - Valid flags are: o SA_MESSAGES - set $status->messages to the number of messages in the mailbox o SA_RECENT - set $status->recent to the number of recent messages in the mailbox o SA_UNSEEN - set $status->unseen to the number of unseen (new) messages in the mailbox o SA_UIDNEXT - set $status->uidnext to the next uid to be used in the mailbox o SA_UIDVALIDITY - set $status->uidvalidity to a constant that changes when uids for the mailbox may no longer be valid o SA_ALL - set all of the above RETURN VALUES
This function returns an object containing status information. The object has the following properties: messages, recent, unseen, uidnext, and uidvalidity. flags is also set, which contains a bitmask which can be checked against any of the above constants. EXAMPLES
Example #1 imap_status(3) example <?php $mbox = imap_open("{imap.example.com}", "username", "password", OP_HALFOPEN) or die("can't connect: " . imap_last_error()); $status = imap_status($mbox, "{imap.example.org}INBOX", SA_ALL); if ($status) { echo "Messages: " . $status->messages . "<br /> "; echo "Recent: " . $status->recent . "<br /> "; echo "Unseen: " . $status->unseen . "<br /> "; echo "UIDnext: " . $status->uidnext . "<br /> "; echo "UIDvalidity:" . $status->uidvalidity . "<br /> "; } else { echo "imap_status failed: " . imap_last_error() . " "; } imap_close($mbox); ?> PHP Documentation Group IMAP_STATUS(3)
All times are GMT -4. The time now is 07:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy