entrylevel
Technical User
I have a file contains all the names that i need to create directories for,
> more list
align_c_i_fix_out_reg[9].sp
add_408_40_g121:A.sp
align_c_i_fix_out_reg[10].sp
align_g1851:A0.sp
in sh i can do with no problem
#!/bin/sh
for var in `cat list`
do
mkdir tmp/"$var"
done
in ksh i can do with no problem
#!/bin/ksh
for var in $(cat list_2)
do
mkdir tmp/"$var"
done
just curious how to do it in csh?
when I tried
#!/bin/csh
foreach i ("`cat list_2`")
mkdir tmp/"$i"
end
says "foreach: No match"
but I can do
> set testvar="`cat list | head -1`"
please comment, thanks.
Regards!
> more list
align_c_i_fix_out_reg[9].sp
add_408_40_g121:A.sp
align_c_i_fix_out_reg[10].sp
align_g1851:A0.sp
in sh i can do with no problem
#!/bin/sh
for var in `cat list`
do
mkdir tmp/"$var"
done
in ksh i can do with no problem
#!/bin/ksh
for var in $(cat list_2)
do
mkdir tmp/"$var"
done
just curious how to do it in csh?
when I tried
#!/bin/csh
foreach i ("`cat list_2`")
mkdir tmp/"$i"
end
says "foreach: No match"
but I can do
> set testvar="`cat list | head -1`"
please comment, thanks.
Regards!