AIX 5.3 / KSH
I have a Java application which creates a log file a.log. I have a KSH script which does the following action
cp a.log /directory2/b.log
> a.log
After this the file size goes to 0 as per "ls -l"
Then next time when the application writes into this file, the file size... (4 Replies)
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 All,
I have a piece of perl code in which I DON'T want to delete a file rather empty out the contents, here is the code -
if ( unlink("$opt_b") == 1 ) {
print_log( "$opt_b deleted", 1 );
}else {
print_log( "Could not delete $opt_b:$!", 1 );
... (5 Replies)
Hi there,
I'm just starting out with shell scripting and I'm trying to make a test where the script will basically run yum check-update to find out if the server has any available and if it does it e-mails me but if not it will just stop there.
I have it working if there are actually... (7 Replies)
The below awk improved bu @MadeInGermany, works great as long as the input file has data in it in the below format:
input
chrX 25031028 25031925 chrX:25031028-25031925 ARX 631 18
chrX 25031028 25031925 chrX:25031028-25031925 ARX 632 14... (3 Replies)
Discussion started by: cmccabe
3 Replies
LEARN ABOUT DEBIAN
ns_while
ns_lctl(3aolserver) AOLserver Built-In Commands ns_lctl(3aolserver)__________________________________________________________________________________________________________________________________________________NAME
ns_for, ns_foreach, ns_while, ns_lctl - Replacements for standard Tcl loop commands which enable monitoring and control
SYNOPSIS
ns_for start test next body
ns_foreach varname list body
ns_foreach varlist1 list1 ?varlist2 list2 ...? body
ns_while test body
ns_lctl cancel id
ns_lctl eval id script
ns_lctl info id
ns_lctl install command
ns_lctl list
ns_lctl pause id
ns_lctl result id
_________________________________________________________________DESCRIPTION
The ns_for, ns_foreach, and ns_while commands are replacements for cooresponding Tcl commands with the additional capability of monitoring
and control through the ns_lctl command.
ns_for start test next body
See the for(n) man page for usage.
ns_foreach start test next body
See the foreach(n) man page for usage.
ns_foreach varlist1 list1 ?varlist2 list2 ...? body
See the foreach(n) man page for usage.
ns_while test body
See the while(n) man page for usage.
ns_lctl cancel id
Mark the given loop to cancel at the next iteration, resulting in the loop returning with TCL_ERROR.
ns_lctl eval id script
ns_lctl info id
ns_lctl install command
ns_lctl list
ns_lctl pause id
ns_lctl result id
SEE ALSO
for(n), foreach(n), while(n)
KEYWORDS
threads, iteration, list, looping, cancel
AOLserver 4.5 ns_lctl(3aolserver)