01-24-2002
file name edit
ok I have a list of files for example:
130-4-32.HindIII.0.ids
130-4-32.HindIII.0.ppm
130-4-32.HindIII.0.ppm.gz
130-4-33.HindIII.0.bands
130-4-33.HindIII.0.ics
130-4-33.HindIII.0.ids
130-4-33.HindIII.0.ppm
130-4-33.HindIII.0.ppm.gz
130-4-34.HindIII.0.bands
130-4-34.HindIII.0.ics
130-4-34.HindIII.0.ids
130-4-34.HindIII.0.ppm
130-4-34.HindIII.0.ppm.gz
130-4-35.HindIII.0.bands
What I need is to change all names so that djd comes before the file name (as part of the name of course). I need this to be done in batch because I have a few 100 files.
thanks for the help!
cd
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Could anyone give me a idea how to strip the lines from a given file. example
***********
1st occurence
1st occurence
1st occurence
1st occurence
***********
2nd occurence
2nd occurence
2nd occurence
2nd occurence
2nd occurence
2nd occurence
*************
3rd occurence
3rd... (10 Replies)
Discussion started by: sentak
10 Replies
2. UNIX for Dummies Questions & Answers
Hello Everyone
I am new to this forum.
I am having a requirement to edit the file(the file is having some sql code).
And this file is in my colleagues login. This is readonly
Now I would like to edit this file.
In which way can I do this? (1 Reply)
Discussion started by: pradkumar
1 Replies
3. UNIX for Dummies Questions & Answers
I have a .fs file that I want to edit, (or just be able to see what is in it) preferably through a windows environment. Does anyone know how to do that? Thanks (4 Replies)
Discussion started by: kiterboy
4 Replies
4. Shell Programming and Scripting
I have a file oratab with entry like this
SCADAG:/esitst1/oracle/product/9.2.0.8:Y
I am trying to discover a way to change the 9.2.0.8 part of this to something like 10.2.0.4 as part of an upgrade script.
I have tried
cat /etc/oratab >>/tmp/oratab... (1 Reply)
Discussion started by: sewood
1 Replies
5. Shell Programming and Scripting
I have a requirement, which is as follows
*. Folder contains list of xmls. Script has to create new xml files by copying the existing one and renaming it by appending "_pre.xml" at the end.
*. Each file has multiple <Name>fileName</Name> entry. The script has to find the first occurance of... (1 Reply)
Discussion started by: sudesh.ach
1 Replies
6. Shell Programming and Scripting
I have file like
cp -p /var/adm/ /tmp1/tmp1.log
cp -p /var/adm/ /tmp1/tmp2.log
cp -p /var/adm/ /tmp1/tmp3.log
cp -p /var/adm/ /tmp1/tmp4.log
I need to re-write the file like:
cp -p /var/adm/tmp1.log /tmp1/
cp -p /var/adm/tmp2.log /tmp1/
cp -p /var/adm/tmp3.log /tmp1/
cp -p... (3 Replies)
Discussion started by: h_banka
3 Replies
7. Shell Programming and Scripting
I have a file containing dates like below
2010 1 02
2010 2 01
2010 3 05
i want the dates to be like below
20100102
20100201
20100305
i tired using
awk '{printf "%s%02s%02s",$1,$2,$3}'
But it does not work,it puts all the dates in one line,i want them in seperate lines like the... (6 Replies)
Discussion started by: tomjones
6 Replies
8. Shell Programming and Scripting
looking for a script or command to push out from a centralized machine to multiple machines. I have the software in place that will do this already, but I need to tell it what command to run on each machine with this file.
what I need is a script or command to edit a file in a specific manner.... (13 Replies)
Discussion started by: skunky
13 Replies
9. UNIX for Advanced & Expert Users
Hi All,
I have file with 200K Records and each line with 400 character. I need to edit the some part of the file.
For example, i need to edit character from 115 to 125, 135to 145 and 344 to 361
Can you please anyone help me to do this?
Regards, (1 Reply)
Discussion started by: balasubramani04
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have a solaris 10 box. And I want to schedule a cronjob.But it gives the following error
bash-3.2$ crontab -l
crontab: can't open your crontab file.
bash-3.2$ EDITOR=vi
bash-3.2$ export EDITOR
bash-3.2$ crontab -e
crontab: can't open your crontab file.
I checked in... (12 Replies)
Discussion started by: Rossdba
12 Replies
MOTO(9.1) MOTO(9.1)
NAME
moto - create animation scripts
SYNOPSIS
fb/moto [ -fstart end ] [ -sskip ] [ file [ arg ... ] ]
DESCRIPTION
Moto is a command generator tailored for an animator's needs. Its input is a concise description of the animation to be produced; its out-
put is a command file suitable for input to rc or some other command interpreter. Its arguments are an optional file name containing a
moto program (default standard input) and list of numeric parameters that are made available to the program.
A moto program consists of a list of groups of commands guarded by a range of frames. Groups may contain parameter ranges enclosed in
brackets []. For each frame, moto checks each group and processes those whose guards include the current frame number:
1,6: clr 128
1,4: clr -w [0,30] [0,30] [100,130] [100,130]
3,6: clr -w [100,70] [100,70] [130,100] [130,100] 255
This generates
clr 128
clr -w 0 0 100 100
clr 128
clr -w 10 10 110 110
clr 128
clr -w 20 20 120 120
clr -w 100 100 130 130 255
clr 128
clr -w 30 30 130 130
clr -w 90 90 120 120 255
clr 128
clr -w 80 80 110 110 255
clr 128
clr -w 70 70 100 100 255
Two special guards, BEGIN and END, specify actions to be taken before and after processing frames. Moto allows complex computations inside
parameter brackets:
1,10: clr [127.5*(1-cos([0,360]))]
This generates
clr 0
clr 29.82933350233
clr 105.35985734747
clr 191.25
clr 247.3108091502
clr 247.3108091502
clr 191.25
clr 105.35985734747
clr 29.82933350233
clr 0
Expressions may include constants and variables. All values are double-precision floating point numbers. The operators =, /, +, - (both
unary and binary), <, >, <=, >=, ==, !=, ?: and !, all with their meanings as in C, except that all results are coerced to double. The
result of a%b is a-b*(int)(a/b). The result of a&&b is a?b:a. The result of a||b is a?a:b. The exponentiation operator is ^, also writ-
ten **. The expression [a,b] varies from a to b, linearly as the frame number varies between the guards of the group containing the
expression. The expression a[b,c] has the value a*b+(1-a)*c. Its value varies from b to c as a varies from 0 to 1. The expression $i has
the value of the i'th parameter following the file name on moto's command line.
The precedence of operators is, from lowest to highest:
=
? :
||
&&
< <= == != > >=
+ -
* / %
[ ]
^ **
- (unary) ! $
Expressions may be parenthesized to alter precedence.
The following math functions are available:
fabs floor ceil sqrt hypot sin cos tan
asin acos atan exp log log10 sinh cosh tanh
All math functions are as described in the C library, except that angles are measured in degrees rather than radians for the trig and
inverse trig functions. In addition hypot may have two or three arguments, atan may take two arguments instead of one, and may also be
spelled atan2.
For parameterization, and to allow even more complex computations, moto has variables, assignment and computation groups. A computation
group causes no output; rather its body is a group of expressions to be evaluated for their side effects. It is distinguished from a com-
mand group by having a double colon separating the guard and body:
BEGIN:: n=5
1,n:: x=512*sin([0,90])
1,n: pcp -w 0 0 [x] 488 pic.[1,n] %0
This generates
pcp -w 0 0 0 488 pic.1 %0
pcp -w 0 0 195.93391737093 488 pic.2 %0
pcp -w 0 0 362.03867196751 488 pic.3 %0
pcp -w 0 0 473.02632064578 488 pic.4 %0
pcp -w 0 0 512 488 pic.5 %0
Upon occasion it is useful to split moto's output into several files, under program control. A group that is separated from its guards by
an at-sign @ instead of a colon names a file into which subsequent output is to be written. For example,
1,5@ file.[1,5]
1,5: This is file.[1,5].
creates 5 files, with names file.1, ..., file.5. Each file's contents will announce its name.
As is true for all sufficiently large programs, moto has a shell escape. The text of a group separated from its guards by an exclamation
point ! causes a copy of rc(1) to be started. The group's text is sent to rc's standard input, and its standard output inserted into
moto's output.
SOURCE
/sys/src/fb/moto.y
MOTO(9.1)