Search Results

Search: Posts Made By: curleb
15,011
Posted By curleb
uuencode is likely waiting for you to give it an...
uuencode is likely waiting for you to give it an output file name...IIRC, uuencode would accept a '.'-character to infer keeping the same name. Otherwise, it will be whatever you intend the...
2,559
Posted By curleb
another option is to embed the shell variable...
another option is to embed the shell variable itself without using awk's variables:

ps -ef |awk '($8~/proc/ && $9~'$(echo "r${SVRNAME}")') {print $2}'
7,471
Posted By curleb
Yes. I'd start you off w a hint such as:...
Yes. I'd start you off w a hint such as: %035.35s.

However, the most effective approach for you overall is to scrounge up a tutorial that covers printf. Really the same features and behavior...
2,334
Posted By curleb
You'd really need to base it upon some evaluation...
You'd really need to base it upon some evaluation that you can control. You'd test the inputs, and based on behavior, you'd fork off in whatever direction you need. The following function provides...
1,334
Posted By curleb
One way, keeping with your original approach: ...
One way, keeping with your original approach:

cat my_file |while read a b c d e f
> do
> echo "$d-$c-$b"
> done |sed -e 's/Jan/01/g;s/Feb/02/g;s/Mar/03/g;s/Apr/04/g;s/May/05/g;s/Jun/06/...
7,471
Posted By curleb
different shell and OS, but...you're just mixing...
different shell and OS, but...you're just mixing metaphors with the printf formatting directions. %d is decimal, where you inputs are float...%f. The +-char needs to be treated as a string, and...
3,038
Posted By curleb
Either leverage the append mode of the write and...
Either leverage the append mode of the write and trim off the log daily (append, or >>, will create the target file if not present, or it would just append if zero bytes), or you'd want to set...
2,731
Posted By curleb
usually by pressing Enter after you type in the...
usually by pressing Enter after you type in the string...

You could also try seeing what the system intends on doing ahead of time by trying whence, which, man, etc....any of these will give...
3,073
Posted By curleb
typeset -i x="0001234" print $x ...
typeset -i x="0001234"
print $x


...or...


printf "%-10.0f\n" '0001234'
4,417
Posted By curleb
on Solaris 10, I see both -c and -b options: ...
on Solaris 10, I see both -c and -b options:


-> man mailx |less -N
done
1
2
3
4 User Commands mailx(1)
5
...
11,779
Posted By curleb
eerily similar thread and solution...restricted...
eerily similar thread and solution...restricted to the shell as well: https://www.unix.com/shell-programming-scripting/136257-date-within-timeframe-2-days-ago-2.html
4,062
Posted By curleb
You might want to post a sample of the file...
You might want to post a sample of the file layout next time, rather than ask we download your whole file. Otherwise, the following should answer most, if not all in succession, but just so you're...
7,315
Posted By curleb
oooh...180 in terms of the proper Forum placement...
oooh...180 in terms of the proper Forum placement if pseudocoder's correct...

If you're looking to monitor processes on an actual Windows machine, and not connections from a Windows machine onto...
Forum: Solaris 06-01-2010
10,461
Posted By curleb
Well, the nuclear option that you're suggesting...
Well, the nuclear option that you're suggesting for yourself would be for a root or superuser to kill any jobs associated with non-Admin and higher GIDs...every 3 hours. For this to work, you'd need...
5,077
Posted By curleb
I dunno what duke saw as homework in your last...
I dunno what duke saw as homework in your last posting, but...I'd tar and gzip them as follows, although you'd do just as well to lump them all into the same archive too:


for i in * ;do tar...
4,301
Posted By curleb
cracks me up when folks in the UK say: "Duh!" ...
cracks me up when folks in the UK say: "Duh!"

Quick question for the OP...are the files sorted and the records are guaranteed in the same order? Otherwise, what's the key to tie the records? I...
4,301
Posted By curleb
Alister, another quick and dirty masterpiece! ...
Alister, another quick and dirty masterpiece! Works great, for me...

But I must ask: what if they wanted to iterate over the lines in the file? Or would you just wrap it into a while read...?
...
4,301
Posted By curleb
hmmm...I'm not seeing it do that, but I'm only...
hmmm...I'm not seeing it do that, but I'm only playing on ksh93 (U/Win)...

Mocked it up as follows, so that the first and last lines match the scenario, but I only get the one:

$ tr -s ' '...
4,301
Posted By curleb
...doh! time for bed! :D $ tr -s '...
...doh!

time for bed! :D


$ tr -s ' ' <Edit1
607 687 174 0 0 chr1 3000001 3000156 -194195276 - L1_Mur2 LINE L1 -4310 1567 1413 1
607 917 214 114 45 chr1 3000237 3000733 -194194699 -...
4,301
Posted By curleb
Neglected is more accurate. Intrigued by that use...
Neglected is more accurate. Intrigued by that use of paste. Sorry.
42,773
Posted By curleb
there was a typo in my last revision...$usrl is...
there was a typo in my last revision...$usrl is not the same as $url, believe it or not...

Sorry 'bout that...

-> lat="37.451"
lon="-122.18"

-> lon="-122.18"

->...
3,110
Posted By curleb
man grep example: grep 'word' file* ...
man grep

example:
grep 'word' file*

assuming that's what you'd meant by any one of the file's named like or starting with "file"...
5,276
Posted By curleb
I'd agree with scottn on the expr command. Both...
I'd agree with scottn on the expr command. Both awk and cut would work too:


$ echo "neo_opls01_1.log" |awk -F'.' '{print $1;}'
neo_opls01_1
$ echo "neo_opls01_1.log" |cut -d'.' -f1...
38,537
Posted By curleb
More or less based on jim_mcnamara's above, but...
More or less based on jim_mcnamara's above, but allows for implicit and explicit usage:


last_month()
{
typeset my_arg="${1:-$(date '+%m')}"
typeset digit_array='01:12 02:01 03:02...
70,806
Posted By curleb
I'm thinking your issue is more I/O related than...
I'm thinking your issue is more I/O related than an issue with tail; maybe the onus is on the write speed as opposed to your accessing the last 1000 lines of the file. You could even read it into...
Showing results 1 to 25 of 28

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