File: bash-example.sh

package info (click to toggle)
3depict 0.0.23-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 18,628 kB
  • sloc: cpp: 75,669; sh: 6,436; xml: 1,608; python: 350; ansic: 190; makefile: 177
file content (20 lines) | stat: -rwxr-xr-x 473 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

BYTES_PER_RECORD=16
echo "Num args : "$#
echo "Working Directory:"  `pwd`

for (( i=1; i<=$#; i++ )); 
do
	eval arg=\$$i
	echo "Input file: $arg"
	echo "File size:" `filesize $arg` " Bytes"
	NUM_IONS=$(expr $(filesize $arg) / $BYTES_PER_RECORD) 
	echo "Num Ions:" $NUM_IONS 

	#Copy the output into the working directory, so that 3Depict's scanning of the working directory
	# for .pos files will find it
	cp $arg script-output-3Depict-input.pos
done 

exit 0