zowe / zlux

The top-level superproject for zLUX. zLUX includes the Zowe Desktop framework in addition to several built-in apps and an example server implementation.
Eclipse Public License 2.0
39 stars 42 forks source link

nodeServer.sh tail error #198

Open fbeyl opened 5 years ago

fbeyl commented 5 years ago

tail command in nodeServer.sh and zssserver.sh not working on linux (mint). Purpose is to keep last 5 (or x) logfiles this needs the option -n in the tail command otherwise no logfiles are deleted.

for f in `ls -r -1 $ZLUX_NODE_LOG_DIR/nodeServer-*.log 2>/dev/null | tail +$ZLUX_NODE_LOGS_TO_KEEP

should be:

for f in ls -r -1 $ZLUX_NODE_LOG_DIR/nodeServer-*.log 2>/dev/null | tail -n +$ZLUX_NODE_LOGS_TO_KEEP

1000TurquoisePogs commented 5 years ago

I see this too: z/os USS version of tail works fine without -n, but linux version of tail requires it. Looks like USS version can also take -n, so possibly it can be added to have both work.