-
-
-
-
-
-
Ok I have a program who's screen output I want to redirect to file. I've done this before and use
$myprog.out>>out.txt 2>&1
and for some reason this is not working. I test it with a another simple test program
$myprog.test>>out.txt 2>&1
and it works
I run myprog.out and the output goes to screen as usual but redirecting it seems to fail! It was working and now seems to have stopped WTF is going on!
You're redirecting STDERR to STDOUT with 2>&1.. maybe in the second case the program is writing to STDERR? Not sure what that would work..
Anyway, I think this is that you want:
myprog.out | tee out.txt
tee takes STDOUT and redirects to a file. If you also need STDERR output you can do
myprog.out 2>&1 | tee out.txt
-
-
The forces due to braking would not be "redirected into a vertical pull".. Braking would put the star nut or whatever holding mechanism under shear load, not tensile. Maximizing surface area at the interface and mass at the joint is probably most optimal, try to minimize potential stress concentrations. That's not to say a star nut wouldn't do the job!
I think the tensile load wouldn't actually be very much.
-
-
-
Someone is going to hate me for posting this ...
![](http://i.ebayimg.com/19/!B1cKq6Q!mk~$(KGrHqV,!ikE)q6kPR1FBMeky9OS(g~~_12.JPG)
Just came to post this if it hadn't been already.. I'd love to be able to get this, my size and everything.. sigh
-
-
YouTube- HILARY- Drop Your Pants 1983
Funny and not as rage inducing as the others, but still categorically awful.
-
ottbot Thanks a million that makes a lot more sense! I read sever al webpages on this and never found anything about the difference in RECL between formatted and unformatted. Do you have a link?
My shell script just dose
[code]
echo $i >> file.dat
[/code]
where "i" is between 0 and 9 so only ever one character long nd the file looks like this for example
[code]
1
5
2
2
9
3
4
[/code]so it looks like I should beable to do a formatted read with RECL=1 and then pick out the record I want.
Found that bit about formatted direct i/o here: http://docs.sun.com/source/819-3685/2_io.html
You have a small kink due the newlines in your file.. You just have to adjust your record size and format to account for it.. This program will read the first nine records:
[code] PROGRAM reader
INTEGER :: a, i CHARACTER*1 :: nl OPEN(2, FILE='file.dat', ACCESS='DIRECT', RECL=2, FORM='FORMATTED') DO i=1, 9 READ( 2, '(I1,A)', REC= i ) a, nl WRITE(*,*) 'record ', i, ' is ', a ENDDO END PROGRAM[/code]
Hope you get it sorted - fortran can be really esoteric, especially when dealing with code written in the 80's.. does my head in..
-
The file is created with a bash file, that is clearly where I am wrong. I thought binary access was different again, at least that was the impression I got from the documentation I found. The documentation I've found about direct access has not been the best, it seems a lesser used feature.
That gist.github.com looks like a good idea. I'll try and pick out the bit I'm using.
I looked at this a bit more, formatted direct access isn't binary (unformatted is) - and in the case of formatted, RECL depends on size needed by your format length in characters..
If you're writing out integers with a format of I5, the record len is 5 bytes because the record is read as 5 characters, including padding.
So if I have an output file with the contents:
[code] 1 2 3 4 5 6 7 8 9 10[/code]and I want to read record 6, I need:
[code] INTEGER :: iOPEN(2, FILE='test.dat', ACCESS='DIRECT', RECL=5, FORM='FORMATTED') READ( 2, '(I5)', REC= 6 ) i[/code]
If you were dealing with unformatted direct access, the RECL would just be the size of the integer kind.
If you want to post up a snippet of your output file, I can try to read it.. Basically, you just need to make sure each integer you write with bash has a fixed width padded by leading spaces - so you need to know the max integer you'll be outputting - you can always just make it huge.. Then set the length in the RECL and FMT values.
-
Fucking fortran. Trying to do direct access. I've given up because when reading you have to specify the record e.g
read(11,REC=1) var
which if I read in unformatted gives gobadly gook. and if I read in formatted
e.g
read(11,'(I2)',REC=1) var
gives me error in my record number (REC), changing the REC to be gives me different error of non valid REC or something I forget.
Done a hack of sequential access but opening and closing the file, string recognition and some other bullshit that in any other language would not be needed. The amount of fannying around I have to do gets on my tits.
Ah, fortran - I didn't realize what you were talking about before..
Did you create the input file with direct access?
If you want to post your code on gist.github.com I can take a look.. Though I think I would need your binary file to test, do you have the code that created the file?
-
I'm trying to work out he value of a variable for a function in documentation I have found this.
and
I'm dealing with a single integer of kind 2 which apparently is 4 bytes, I can't find anything about LEN I presume this us just the length of the list so in my case 1*4. Or is there some other computer science this LEN thing could be?
Just from the context, it sounds like thats right.. You need to allocate the size of your the record, which is the sum of the size of its elements, so just 1 * integer_bytesize if there's just one of them.
Out of curiosity, what are you working with?
-
A3 size is the size of two A4 sheets side by side, so would be optimal for that sort of thing (though the page is just twice as big, it scales down proportionally)
The letter/legal sizes are used in the US, A4 is the "regular" paper size in the UK. I have no idea if legal paper is used in the UK at all.. Either way, I can make your PDF.
-
-
-
I'll just leave this over here........
http://www.etsy.com/listing/48004663/the-vah-genie-crochet-bicycle-seat-cover
the headache is just your organs saying thank you for the rest you're giving them.. it's all natural.