Formatting a file - 29/12/02 03:27 PM
I am trying to write a script that will read a txt file line by line, removing a specified amount of spaces to the right of the start of the line. Now I am unsure if I am using the right identifiers but....would make an alias
alias altered {
set %i 1
write $2 $right($read($1 ,s, * , %i )6))
inc %i
}
usage would be
/altered one.txt two.txt
I know I am also missing a loop to cycle through each line of the file til it's done but I am unsure of how to put that in either...I know it's asking a lot but if I can get some guidance I would appreciate it very much...
TIA
TC
alias altered {
set %i 1
write $2 $right($read($1 ,s, * , %i )6))
inc %i
}
usage would be
/altered one.txt two.txt
I know I am also missing a loop to cycle through each line of the file til it's done but I am unsure of how to put that in either...I know it's asking a lot but if I can get some guidance I would appreciate it very much...
TIA
TC