I think you should be pleased that you created a solution. There are many ways to approach problems in *nix. For long files, while-read loops can be very time-consuming. You can often use utilities to process an entire file. Here is one example with your situation:
Producing:
The trtranslates characters in an entire file. The subsequent special assignment with the variable is peculiar to some shells, so I provided a alternative sed step to remove the final ",".
See man pages for details.
For the size of problems such as this is likely to be, most solutions are probably the same in efficiency. However, it is useful to know about other methods in general ... cheers, drl
Hi
Can anyone help me with the task below?
Example:
The contents in fileA.txt are:
HELLO
HOW DO U DO?
The contents in fileA.txt are:
HI
I AM FINE.
how to combine the data in 2 files into one with the format below?
Case A-fileA.txt
HELLO
HOW DO U DO?
Case B-fileB.txt (4 Replies)
hi!
i have a file consisting of the following lines:
(BTW, = space)
.
.
.
12ME_T1mapping_flip30bshortf
13DCE_whole_brainbshortf
13DCE_3Dbshortf
.
.
.
the list of scans starts at 1 and goes on sometimes up to 60 scans. i would like to change only the lines that contain 'whole' to... (2 Replies)
Hi,
I have a file with data as follows:
324dsadfasfgf23<xmlsssssssssssssssssssssssssssssssssssssss<fdf>dfsdf>
i need all the data followed by the string <xml?
Is it possible to retrieve it? (1 Reply)
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
Hi, I have a single colum file and I need to reformat the file so that it creates a new line every time it come to an IP address and the following lines are corresponding rows until it comes to the next IP address.
I want to turn this
172.xx.xx.xx
gwpusprdrp02_pv
seinwnprd03... (7 Replies)
Hi All, found similar posts, but not exatcly what i wanted.
I have an text file like below and am trying to send mail as an excel file but when i get the excel file as the attachment, all the data is coming in the first column. I need below data in 4 columns.
Unix file
Name,ID,Trade,Date... (3 Replies)
I have a file in unix with sample data as follows :
--------------------------------------------------------------
--------------------------------------------------------------
{30001002|XXparameter|Layout|$
I want this file to be splitted into different files and corresponding to the sample... (54 Replies)
Hi All,
Need your inputs for the below.
I have 2 different servers 611 & 610, where i would be running two scripts. And would would be running one script from 611 at every 4 hours to merge the data from the 2 servers into 2 files and send a mail.
so below is the code snippet for 611:
... (3 Replies)
1)In a particualr path i have a set of inputfiles like
path:/defaultmis/MonthlyLoads/INFA_EXPORT_022013/map*
example:
1)map_de
2)map_cod
3)map_feg
........and so on
in above path there wil be nearly 15 to 20 files starting with map and in other path i have another file input file... (4 Replies)
Hi Experts,
I have created multiple scripts and send the output to new file, getting this output to my mailbox on daily basis.
I would like to send the all outputs to a single file, need to merge all file outputs on a single file.
For example,
Created script for
df -h > df.doc
grep... (7 Replies)