Search Results

Search: Posts Made By: steweston
10,622
Posted By steweston
Check script ownership - compare with crontab...
Check script ownership - compare with crontab owner.

Also check what actually happens when called from cron by adding a log location:
eg:
00 20 12 * * /usr/test/scr1.sh > /tmp/script.out 2>&1
...
2,633
Posted By steweston
Have you thought about: grep -v -w NONE...
Have you thought about:

grep -v -w NONE 12345.dst |sort -u
2,457
Posted By steweston
I am not sure that you understand the grep...
I am not sure that you understand the grep command because it seems as though you are trying to format data which is in a fixed order, rather than search for specific patterns of text - which is the...
Forum: HP-UX 06-15-2006
4,488
Posted By steweston
sourcing a file
NORM,

. file
is known as sourcing a file.

It will pull any env settings, or variables set within the file into the current shell.

[ Normal behaviour is for a child process to inherit from a...
151,008
Posted By steweston
if [$? -ne 0]
$? is the return code form a previous command or function
in unix, 0 is the standard return code for a successful completion

if [$? -ne 0]
The whole line means

'if the previous return code...
3,086
Posted By steweston
Try stripping off the -exec part of the statement...
Try stripping off the -exec part of the statement to see what the output is before we manipulate it.
execute
find /home -mtime +7 -type f
3,086
Posted By steweston
Denys, You can simplify this in a couple of...
Denys,

You can simplify this in a couple of ways.

1) Use the type switch for 'find' command - to limit your results to files - not dirs or anything else
-type f

2) Use an exec at the end...
22,337
Posted By steweston
echo "Whatever you want, including variables...
echo "Whatever you want, including variables $VAR1 , $VAR2" >> your_file
5,699
Posted By steweston
umask
Fred,

Look at the man page for the 'umask' command.

Careful - the umask command works to REMOVE permissions from the user's default, rather than add them.

More generally, this will acheive...
4,056
Posted By steweston
Try a bit of awk
burakkilic,

I normally use awk for this kind of problem - it works effectively

awk '{tot+=$1} END{print tot}' numbers.txt

Alternatively, change your script as shown:

#!/bin/sh
sum=0
for...
4,271
Posted By steweston
sed using variables
Bags,

Try using double quotes " instead of single quotes ' in your sed statement.

This allows you to still pass variables as you require.
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 01:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy