Hi,
I want to find the exit status of the last executed command in C Shell.
Tried $? but getting the error Variable syntax...$? does not seem to work in C shell..
is there any other command in C shell to find the exit status of last command?
Thanks in advance,
raju (1 Reply)
I am executing a find command in my script i.e
find $2 -type f -name '*.gif' -mtime +$1 -exec rm {} \;
how do i check that this command is executed properly.. i would lke t trap the errror and display my error message
kinly help.. this is an urgent issue. (1 Reply)
Hi All,
I am checking for a empty input file to do some further action , but I am getting exit status 0 in both the cases , for empty and non empty file both.
The value of $? is coming 0 in if part also and else part too.
#!/bin/ksh
if ]; then
echo "data"
# exit 0
echo "$?"
else... (4 Replies)
Hi,
Want to log the output of command & check the exit status to find whether it succeeded or failed.
> ls abc
ls: abc: No such file or directory
> echo $?
1
> ls abc 2>&1 | tee log
ls: abc: No such file or directory
> echo $?
0
Tee commands changes my exit status to be always... (7 Replies)
I need to find empty files in a directory and write them into a text file. Directory will contain old files as well, i need to get the empty files for the last one hour only. (1 Reply)
My code to "Delete empty files from a directory entered in command promt"
#/bin/sh
echo "Enter directory"
read gh
for file in `ls $gh`
do
# to get the size of file
a=$( ls -l file | awk ' {print $7} ');
echo $a
if
then
echo "removing file "
rm file
fi
done (6 Replies)
Hello All,
I am trying to capture the exit status of find command and want to delete the files only when it is successful. But it is always returning me as success even if the pattern of that file doesn't exist in the current directory. please help, checked manual page but couldn't able to figure... (6 Replies)
I have the following code in a script:
find . \( ! -name . -prune \) -name "cg*" -exec cp -p {} "${temp_dir}" \;
ret_stat=$?
I think the return status is only captured for the 'find' command and not for the 'cp' command. Is there a way to get the return status for the 'cp' command... (7 Replies)
In a fastload teradata utility I am trying to delete the files which are older than 30days using the find and rm command as following.
find . -name 'xxx_*' -mtime +30 -exec rm -f {} \;
I expect it to delete all the files older than 30 days but sometimes it gives an error : find: bad status--... (3 Replies)
Discussion started by: stelkar
3 Replies
LEARN ABOUT DEBIAN
jzip
JZIP(6) John's Z-code Interpreter Program JZIP(6)NAME
jzip - execute Infocom v1-5 and Inform v1-5 & v8 game files
SYNOPSIS
jzip [ options ] z-file-name
DESCRIPTION
jzip invokes the Z-code Interpreter.
REQUIREMENTS
jzip will run under most (if not all) flavors of Unix, including AIX, Solaris, SunOS, HP/UX, Linux, Free/NetBSD, IRIX, NeXT Mach, DEC
OSF/1, and others.
EDITING
JZip now supports arrowkey editing in UNIX.
Up/Down
selects the previous / next command in history
Left/Right
moves the cursor over the line.
Backspace
deletes
Typing inserts under the cursor
OPTIONS -l n lines in display
-c n columns in display
-r n text right margin (default = 1)
-t n text top margin (default = 0)
-v display version information
-m monochrome mode
-y set Tandy bit
-s n zmachine strict level, from 0 (none), 1 (report once, recommended) to 3.
ENVIRONMENT
jzip looks for the environment variable INFOCOM_PATH and will use the path found there to look for the story file specified on the command
line if the story file cannot be found in the current directory.
CREDITS
jzip is written and maintained by John Holder (j-holder@home.com), based on the ZIP v2.0 sources by Mark Howell and Olaf 'Olsen' Barthel.
AVAILABILITY
The most recent version of jzip can be downloaded from one of:
http://www.jzip.sourceforge.net/
ftp://ifarchive.org/infocom/interpreters/zip/
FILES
/usr/games/jzip
The Z-Code Interpreter Program
/usr/lib/games/zfiles
Recommended location for Zcode files
RELATED USENET NEWSGROUPS
Interactive Fiction (IF) authors should check out rec.arts.int-fiction, and IF players should check out rec.games.int-fiction.
2.1JZIP(6)