Search Results

Search: Posts Made By: grasper
4,216
Posted By grasper
I've never actually seen this option myself, but...
I've never actually seen this option myself, but it seems quite useful.

Just out of interest, when using it to create a script, how do you convert it to non-encrypted form for execution?

Thanks
4,348
Posted By grasper
-o switch in find
Hello all

I'm experimenting with the use of the -prune action and I've encountered some confusing behaviour when using the -o option. Can't find anything specific in the man page.

If I have a...
2,231
Posted By grasper
sort -t, -n -k2 filename >./sorted_filename
sort -t, -n -k2 filename >./sorted_filename
4,039
Posted By grasper
Hi Helen I think the issue with...
Hi Helen

I think the issue with variable-expansion and noglob is only a problem when doing your 'eval'. Setting noglob to on shouldn't affect it otherwise. I think I'm roughly using your...
4,039
Posted By grasper
Apologies, I may have been a bit hasty in...
Apologies, I may have been a bit hasty in suggesting that in that way. noglob prevents wildcard characters from being expanded.

I don't know exactly how you'll be extracting your variables from...
4,039
Posted By grasper
You could set -o noglob before the eval and then...
You could set -o noglob before the eval and then set +o noglob after.
19,790
Posted By grasper
Just a guess, but I think the . command is...
Just a guess, but I think the . command is instructing the current shell to interpret the script - which it can't because it has perl commands/functions in it.
3,739
Posted By grasper
I'd use perl for something that...
I'd use perl for something that involved.Something like:-

#!/usr/bin/perl

# Use Perls localtime function if you want, but this is plainer
$date=`date '+%d_%m'`;
chomp($date);

open...
5,402
Posted By grasper
csplit should do the job, try 'man csplit'
csplit should do the job, try 'man csplit'
5,522
Posted By grasper
It's the same issue - the shell you're using...
It's the same issue - the shell you're using can't deal with non-integers.

Use the same technique as jim has shown - pipe the expression through to the bc function.
1,886
Posted By grasper
For files you can use:- find /filesystem...
For files you can use:-

find /filesystem -size 0c -print
31,548
Posted By grasper
Are you redirecting your output to another file?...
Are you redirecting your output to another file? That command won't change the file itself.
3,244
Posted By grasper
Ok, run the script for each possible value of...
Ok, run the script for each possible value of v_id and echo out the values of $v_flag.

Or alternatively, add the loop back, but edit it each time to run only one of the potential values of v_id...
77,679
Posted By grasper
The posts above tell you everything you need to...
The posts above tell you everything you need to know (plus you've answered your own question with the example of the script that works when called by the cron).

Your .profile contains environment...
3,034
Posted By grasper
Try:- mins=$(echo $time|sed -n ...
Try:-

mins=$(echo $time|sed -n 's/.*[^0-9]\([0-9][0-9]*\).*/\1/p')

hrs=$(echo $time|sed -n 's/\([0-9][0-9]*\)[^0-9]*.*/\1/p')

I think that should give you the hours and minutes whatever...
3,244
Posted By grasper
Well I'm still not convinced it's because the...
Well I'm still not convinced it's because the query's returning nothing. It sounds more like it's returning something the query can't handle, but why not try putting quotes around the variable in the...
3,244
Posted By grasper
I can's see any reason why not - are you sure...
I can's see any reason why not - are you sure that's the problem?

I'd echo out the value of $v_flag for each iteration and see what it actually contains. It may be that it has some unexpected...
11,579
Posted By grasper
If mdbase is the end of the field or word...
If mdbase is the end of the field or word separated from whatever follows by whitespace you can use:-

grep "/backup/surjya/mdbase\>" xmldir.conf_backup | wc -w
2,570
Posted By grasper
use :- if [[ $choice -lt 1 || $choice -gt 7...
use :-

if [[ $choice -lt 1 || $choice -gt 7 ]]
then
.....
fi

cheers
1,645
Posted By grasper
Try :- grep '^[A-Z][A-Z|a-z]*[tcz][A-Z|a-z]*...
Try :-

grep '^[A-Z][A-Z|a-z]*[tcz][A-Z|a-z]* .*[0-9]*[02468][0-9]*$' /home/public/data.txt

as your grep
1,974
Posted By grasper
Your test condition is always going to be true. ...
Your test condition is always going to be true.

If you enter 'y' for the $true variable then "$true != 'Y'" will be true, if you enter 'Y' for the $true variable then "$true != 'y'" will be true....
1,645
Posted By grasper
Well you're doing a head and a tail, so you're...
Well you're doing a head and a tail, so you're deliberately removing some (arbitrary) results from the grep.
35,490
Posted By grasper
I may have misunderstood your problem and I've...
I may have misunderstood your problem and I've gone a bit 'quote-blind' looking at your output, but it seems to me the single quotes are there because you're running the script in debug mode and the...
2,456
Posted By grasper
Well awk can handle non-integer arithmetic, but...
Well awk can handle non-integer arithmetic, but not standard bash or tcsh.
2,456
Posted By grasper
It was indeed - should have taken my own advice...
It was indeed - should have taken my own advice and cut-and-pasted from the terminal!

Apologies for that. Cheers vgersh99.
Showing results 1 to 25 of 43

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