Search Results

Search: Posts Made By: saleheen
Forum: Programming 05-01-2015
1,870
Posted By drl
Hi. Using the short code: program one...
Hi.

Using the short code:
program one

character(len=20)::filename
integer i

do i=1,10000 ! file loop
! write(*,*)'OwZ-',i,'.xyz'
write(*,9) i...
Forum: Programming 04-29-2015
1,870
Posted By RudiC
My FORTRAN days are long gone. So this is a wild...
My FORTRAN days are long gone. So this is a wild guess: How about write (TMP, *) iand then concatenate 'OwZ-', TMP, '.xyz' into filename?
Forum: Programming 04-29-2015
1,870
Posted By RudiC
What be the verbatim msg of your run time error?...
What be the verbatim msg of your run time error? I don't know what happens if you open a unit twice without closing it, but this is what you do in the file loop.
Forum: Programming 04-25-2015
6,640
Posted By drl
Hi. To make one's code more readable, one...
Hi.

To make one's code more readable, one can use a tidy or pretty-printing code. Here's an example:
#!/usr/bin/env bash

# @(#) s1 Demonstrate Fortran-90 preprocessor, pretty-print, f90pp4....
Forum: Programming 04-25-2015
6,640
Posted By Don Cragun
I haven't written much FORTRAN since ~1975, the...
I haven't written much FORTRAN since ~1975, the language is a lot more free-format than the language I used at that time, and I find your indentation hard to follow; but if I am reading your code...
Forum: Programming 04-25-2015
6,640
Posted By Don Cragun
Where is T() declared? Is it an array or a...
Where is T() declared? Is it an array or a function? If it is an array, where are the elements of T set?

Where is r defined? Where is r set?

If it stops after printing reac-1 without...
5,176
Posted By RudiC
awk 'NR==1 {A=$2} # initialize the A...
awk 'NR==1 {A=$2} # initialize the A variable from $2 on the first line
NR%2 {$2=A++} # on every other line, replace $2 by the post-incremented A value
1 ...
5,176
Posted By RudiC
Keeping your line format for the modified lines...
Keeping your line format for the modified lines is not easy. I use <TAB> as the output field separator. And, no precaution is taken to get the input files in the correct order. Tryawk 'NR==1 {A=$2}...
5,176
Posted By RavinderSingh13
Hello Saleheen, Following code may help you...
Hello Saleheen,

Following code may help you in same, but not tested though.
Kindly try the same and let me know if this helps.

awk 'FILENAME=="file1" {if(NR%2!=0){print $1 OFS $2;A=$2}}...
1,122
Posted By bakunin
Time for a little introduction to regular...
Time for a little introduction to regular expressions:

Regular expressions (or "Regexps") are a tool for matching patterns in texts. They consist of

ordinary characters
metacharacters

...
1,122
Posted By bakunin
OK, step by step! Try this one (replace "<t>" by...
OK, step by step! Try this one (replace "<t>" by literal tab characters):
sed '/Pt[ <t>]*\([0-9]\.[0-9]\{14\}[ <t>]*\)\{2\}[0-2]/ s/$/ bottom!/' /path/to/input > /path/to/output

This should mark...
1,122
Posted By bakunin
Please bear with me, but my Unix skills are...
Please bear with me, but my Unix skills are better then my rudimentary knowledge of condensed matter physics.

1) What is - in terms of dsitinguishing text elements - a "bottom layer"? Can it be...
14,470
Posted By achenle
If you can mount the file system on the Windows...
If you can mount the file system on the Windows box, why bother copying them? Just use them from the mounted file system directly.

Just set up Samba on the Unix box and share out the file system...
14,470
Posted By bakunin
Just a suggestion: why not use "rsync...
Just a suggestion: why not use "rsync (http://rsync.samba.org/documentation.html)"? It looks like it is doing exactly what you need and it can be configured to transfer only files newer than the ones...
14,470
Posted By Corona688
busybox is an entire UNIX "toolkit" in a single...
busybox is an entire UNIX "toolkit" in a single executable, bringing a shell and lots of standard commands. They use it in things like wireless routers where space is limited. Or when you want to...
14,470
Posted By Corona688
If I understand your problem correctly, and...
If I understand your problem correctly, and you're willing to use busybox and pscp...

On the Windows side, I made example data like:

C:\Documents and Settings\User>mkdir cp-test
C:\Documents...
14,470
Posted By Corona688
Hmmm. Based on that, my very first and very firm...
Hmmm. Based on that, my very first and very firm suggestion would be:

BACK UP THAT DATA!

The slightest mistake on our part could doom your project.
14,470
Posted By Corona688
1) Your windows system doesn't know the UNIX...
1) Your windows system doesn't know the UNIX folder names, scp can't tell it.

2) They're not identical. Not even close -- different names, different depths. If they were handmade they might not...
14,470
Posted By Corona688
If that will work... Given...
If that will work... Given \windows\path\to\CHO-species\C2H1O1\, can you strip off \windows\path\to to get the UNIX path?

If not, perhaps you could rename them to be identical to the UNIX path?
...
14,470
Posted By Corona688
You can get scp for Windows, yes. I use pscp...
You can get scp for Windows, yes. I use pscp (http://www.chiark.greenend.org.uk/~sgtatham/putty/), published by the same people who created the PUTTY terminal program. It can be put in a batch file...
14,470
Posted By blackrageous
How do you transfer the files. Do you use...
How do you transfer the files. Do you use (ssh/scp). If so, then it's easy to get what you want. The issue is not so much writing the script, the issue is what mechanism you use to transfer the...
40,947
Posted By bakunin
Actually i am telling you to use only absoulte...
Actually i am telling you to use only absoulte paths in all your scripts.



Yes, it should. I looked at your script in post #1 and there it reads:



I take it that has already been dealt...
40,947
Posted By bakunin
The error message is coming from inside the...
The error message is coming from inside the script and it is, because where the script is there is no such file as "*.cell". Note that "*.cell" is meaning all the files in the current directory with...
40,947
Posted By bakunin
If the scripts (short) name is "GEN_POSCAR", then...
If the scripts (short) name is "GEN_POSCAR", then it is a file in directory "/scratch/scratchdirs/saleheen/Scripts/My-scripts". The full name would be...
40,947
Posted By MadeInGermany
Assignments like count_C=$(grep -c C mols) do not...
Assignments like count_C=$(grep -c C mols) do not work in csh (csh would need the set keyword before).
So the shebang #!/bin/bash is correct (of course it must exist).
Your script expects to be...
Showing results 1 to 25 of 36

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