Search Results

Search: Posts Made By: dtrescott
6,097
Posted By jville
Try this #this script renames schematic...
Try this


#this script renames schematic file for model year change

#my = model year prefix
my="lsd"
for i in `ls lsb*`
do
old=$i
new=`echo $i | cut -c4 -c30`
done
mv $i $my$new...
6,097
Posted By Scott
Hi. The error looks C-Shell-like. If I...
Hi.

The error looks C-Shell-like.

If I run this in C-Shell I get lots more errors:


my=lsd: Command not found.
for: Command not found.
do: Command not found.
i: Undefined variable.

...
6,097
Posted By Neo
Also, for starters: my="lsd" for i in...
Also, for starters:

my="lsd"

for i in 'ls lsb*'

Is this right??
6,097
Posted By Corona688
I think the last bit should be 'done', not 'end'....
I think the last bit should be 'done', not 'end'.

And "for file in `ls *`" is a useless use of backticks (http://partmaps.org/era/unix/award.html#backticks), you can just do "for file in *" and...
Showing results 1 to 4 of 4

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