Search Results

Search: Posts Made By: curleb
13,960
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...
1,925
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}'
5,652
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,100
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,181
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/...
5,652
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...
2,755
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...
1,942
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...
1,840
Posted By curleb
typeset -i x="0001234" print $x ...
typeset -i x="0001234"
print $x


...or...


printf "%-10.0f\n" '0001234'
4,166
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
...
10,439
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
3,699
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...
6,318
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-02-2010
9,598
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...
4,194
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...
3,149
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...
3,149
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...?
...
3,149
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 ' '...
3,149
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 -...
3,149
Posted By curleb
Neglected is more accurate. Intrigued by that use...
Neglected is more accurate. Intrigued by that use of paste. Sorry.
36,831
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"

->...
2,856
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"...
4,959
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...
36,234
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...
58,127
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

 

Featured Tech Videos

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