Search Results

Search: Posts Made By: toshidas2000
36,854
Posted By toshidas2000
Nothing worked, I am using K Shell
Nothing worked, I am using K Shell
36,854
Posted By toshidas2000
Removing leading zeros from a variable
How do I remove or add leading zeroa from a variable. To make variable 10 characters long when adding zeros.
5,132
Posted By toshidas2000
I am posting the script #!/bin/ksh j=1 ...
I am posting the script

#!/bin/ksh
j=1
for i in `ls /TEST/DIR1/test_dat?`;
do
echo $i
echo $j

sed -e 's/FILENAME/${i}/ig' TEST/test$j.ctl > TEST/control$j.ctl
let j=$j+1
done


When I...
5,132
Posted By toshidas2000
nope it did not work
nope it did not work
5,132
Posted By toshidas2000
Nope same error sed: -e expression #1, char...
Nope same error

sed: -e expression #1, char 14: Unknown option to `s'

sed -i "s/FILENAME/$i/g" TEST/test$j.ctl > TEST/control$j.ctl

sed -i "s/FILENAME/'$i'/g" TEST/test$j.ctl >...
5,132
Posted By toshidas2000
Sed issue in K Shell programming
I am doing the following script in k shell

sed -i 's/FILENAME/$i/g' TEST/test$j.ctl > TEST/control$j.ctl

In the file it replaces $i for all FILENAME, it doesnot replace with the value of i. I...
Showing results 1 to 6 of 6

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