How to move files with first part as new filenamevia bash shell scripting?
I am on linux red hat, want to use the logic within bash shell script file.
I have the following type, named files in folder /staging, want to move with new filename just the firstpart upto underscore, example 20180904105056.dat, how can i get upto first part of filename and validate to chk if filename exists then append filename with sequential number at end.
if the file already exists in target folder want to append with _2, _3, _4 so on so forth.
thank you very much for the helpful info.
Hi,
i am new to UNIX. I have couple of basic questions.
1. Is the syntax for BASH shell programming same in the LINUX and SUN SOLARIS operating systems?
2. I have to work on BASH shell programming in SUN SOLARIS operating system. I am going through the documentation from the following... (4 Replies)
Can any1 please help me...
i'm really lost in using bash shell scripting...
and i got to hand this up on monday...
please anyone teach me how to do this assignment...
Please use basic things because i just learn the program only... thanks
... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write a bash shell script that takes as an argument a name. Then your script will ask the user for two numbers.... (15 Replies)
Hello All,
I am setting up a cron job, where i am calling a shell script to make few builds. I got struck at a point, need some expert inputs to proceed further.
The script is categorized in 5 parts and in the last part while building software it asks for few questions like:-
1. Build mode... (4 Replies)
I'm having trouble trying to create a BASH shell script.
I want the user to input a command "cat file_name.c" and then the shell script will delete all comments "/* */" from file_name.c else exit.
So far I have this:
#!/bin/bash
read "cat file" // User will input command cat... (7 Replies)
I do not know shell scripting. But at work place, I have got an in and out shell scripting task. I just need to understand a very big script. Is there any tool in which I can place the script and it can tell me the meaning of the whole script? (3 Replies)
I have a directory /home/cmccabe/nfs/exportedReports that contains multiple folders in it. The find writes the name of each folder to out.txt. A new directory is then created in a new location /home/cmccabe/Desktop/NGS/API, named with the date. What I am trying to do, unsuccessfully at the moment,... (7 Replies)
I've got this script to loop through all folders and move files that are more than 2 years old. I'm using the install command because it creates the necessary directories on the destination path and then I remove the source. I'd like to change the script to use the mv command since it is much... (4 Replies)
I am trying to mv each of the .vcf files in the variants folder to the folder in /home/cmccabe/f2 that the .vcf id is found in file. $2 in file will always have the id of a .vcf in the variants folder. The line in blue staring with R_2019 in file up to the -v5.6 will always be an exact match to a... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT OSF1
geom
geom(1)geom(1)NAME
geom - analyzes a molecular geometry input in Cartesian coordinates.
DESCRIPTION
The program geom reads a set of Cartesian coordinates and determines from them the bond distances (Bohr and angstrom), bond angles, tor-
sional angles, out-of-plane angles (optional), moments of inertia, and rotational constants.
FILES REQUIRED
input.dat - Input file
and one of the following:
geom.dat - geometry file
file11.dat - PSI-format geometry/gradient file
FILES GENERATED
geom.out - file containing the analysis
INPUT OPTIONS
The geom program has the following options:
-h Print help information (these options).
-aces [filename]
Read the input in an ACES output format, with each line consisting of atomic symbol, atomic number, and Cartesian coordinates (in
Bohr). The optional argument is the name of the geometry input file, which defaults to geom.dat.
-qchem [filename]
Read the input in an QCHEM output format, with each line consisting of the atom number, the atomic symbol, and Cartesian coordinates
(in Angstroms). The optional argument is the name of the geometry input file, which defaults to geom.dat.
-xyz [filename]
Read the input in an XYZ output format. The first line contains the number of atoms and the second line is a comment line. Subse-
quent lines each contain the atomic symbol and Cartesian X Y and Z coordinates (in Angstroms). The optional argument is the name of
the geometry input file, which defaults to geom.dat.
-oop Print out-of-plane angles, where the angle a-b-c-d is defined as the angle formed by the vector a-d and the plane defined by atoms
b, c, and d.
DO_OOP = boolean
Same as command-line switch -oop described above.
ISOTOPES = matrix of reals/strings
Used to specify masses to be used in the calculation of the center of mass and rotational constants. One array is provided for each
isotopomer to be calculated. The arrays can mix floating point numbers with strings which designate isotopes. If this array is not
given and file11.dat is present, then the masses will be obtained by converting the atomic numbers in file11. If masses are not
given by ISOTOPES or by file11, then no mass-related quantities will be calculated.
-g [filename]
Read Cartesian coordinates from a file other than file11.dat. If a filename is not given, the default is geom.dat. The alternative
file is assumed to be in a format similar to that of PSI's geom.dat. Since such files do not contain atomic numbers, the moments of
inertia and rotational constants are not calculated if this option is used.
READ_GEOM = boolean
This option in input.dat tells geom to read the geometry from geom.dat in the PSI geom.dat format.
-a Print parameters for all pair distances.
PRINT_ALL_DIST = boolean
Same as -a flag described above.
-d distance
Only print parameters involving pairs of atoms which are less than distance bohr apart (default value is 4.0 bohr).
PRINT_DISTANCE = value
Same as -d flag described above.
-angstrom
The input coordinates are in angstroms, not bohr.
ANGSTROM = boolean
If TRUE, the input coordinates are in angstroms instead of bohr. The default is FALSE.
The following example is for calculating the geometrical information for water with several different isotopes. The geometry is
read from geom.dat rather than from file11.dat.
geom: (
read_geom = true
isotopes = (
(O H H)
(O D D)
(O18 1.007825 1.007825)
) )
5 June, 1998 geom(1)