jayjaybigs
IS-IT--Management
The idea is to do the following:
(1)Split one big file into several smaller files of equal sizes
(2)Perform operation on the smaller sizes
(3)Join the smaller files into a big file
(4)Remove all the smaller files created in (1).
Here are the efforts:
#!/bin/sh
#split big file
split bigfile outfile
#Perfom Operation on each file - change space to comma within each file
cat outfile* | %s/ /,/g
#join smaller files
cat outfile* > bigfile_result
#Remove all smaller files.
rm outfile*
This does not work, please advice.
(1)Split one big file into several smaller files of equal sizes
(2)Perform operation on the smaller sizes
(3)Join the smaller files into a big file
(4)Remove all the smaller files created in (1).
Here are the efforts:
#!/bin/sh
#split big file
split bigfile outfile
#Perfom Operation on each file - change space to comma within each file
cat outfile* | %s/ /,/g
#join smaller files
cat outfile* > bigfile_result
#Remove all smaller files.
rm outfile*
This does not work, please advice.