08-24-2016
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have one large file, after every 200 line i have to split the file and the add header and footer to each small file?
It is possible to add different header and footer to each file? (1 Reply)
Discussion started by: ashish4422
1 Replies
2. UNIX for Dummies Questions & Answers
This may sound like a trivial problem, but I still need some help:
I have a file with ids and I want to split it 'n' ways (could be any number) into files:
1
1
1
2
2
3
3
4
5
5
Let's assume 'n' is 3, and we cannot have the same id in two different partitions. So the partitions may... (8 Replies)
Discussion started by: ChicagoBlues
8 Replies
3. Shell Programming and Scripting
Hi All,
I am trying to extract data from a large text file , I want to extract lines which contains a five digit number followed by a hyphen , like
12345- , i tried with egrep ,eg : egrep "+" text.txt
but which returns all the lines which contains any number of digits followed by hyhen ,... (19 Replies)
Discussion started by: shijujoe
19 Replies
4. Shell Programming and Scripting
I have an extremely large csv file that I need to search the second field, and upon matches update the last field...
I can pull the line with awk.. but apparently you cant use awk to directly update the file? So im curious if I can use sed to do this... The good news is the field I want to... (5 Replies)
Discussion started by: trey85stang
5 Replies
5. UNIX for Dummies Questions & Answers
I have a large directory of web pages. I am doing a search through the web pages using grep and would like to get a list of unique file names of search results. The following command works fine to give me a list of file names where term appears:
grep -l term *.html
However, since these are... (3 Replies)
Discussion started by: rjulich
3 Replies
6. Shell Programming and Scripting
Hi,
I have a data file xyz.dat similar to the one given below,
2345|98|809||x|969|0
2345|98|809||y|0|537
2345|97|809||x|544|0
2345|97|809||y|0|651
9685|98|809||x|321|0
9685|98|809||y|0|357
9685|98|709||x|687|0
9685|98|709||y|0|234
2315|98|809||x|564|0
2315|98|809||y|0|537... (2 Replies)
Discussion started by: nithins007
2 Replies
7. Shell Programming and Scripting
Hi all,
I'm pretty new to Shell scripting and I need some help to split a source text file into multiple files. The source has a row with pattern where the file needs to be split, and the pattern row also contains the file name of the destination for that specific piece. Here is an example:
... (2 Replies)
Discussion started by: cul8er
2 Replies
8. Shell Programming and Scripting
I have 84 files with the following names splitseqs.1, spliseqs.2 etc.
and I want to change the .number to a unique filename.
E.g.
change splitseqs.1 into splitseqs.7114_1#24
and
change spliseqs.2 into splitseqs.7067_2#4
So all the current file names are unique, so are the new file names.... (1 Reply)
Discussion started by: avonm
1 Replies
9. Shell Programming and Scripting
Hi All,
I have a very large single record file.
abc;date||bcd;efg|......... pqr;stu||record_count;date
when i do wc -l on this file it gives me "0" records, coz of missing line feed.
my problem is there is an extra pipe that is coming at the end of this record
like... (6 Replies)
Discussion started by: Gurkamal83
6 Replies
10. Linux
Hi,
Anyone can help, I have a large textfile (one file), and I need to split into multiple file to break each file into ^L.
My textfile
==========
abc company
abc address
abc contact
^L
my company
my address
my contact
my skills
^L
your company
your address
========== (3 Replies)
Discussion started by: fspalero
3 Replies
LEARN ABOUT DEBIAN
mpb-split
MPB(1) MIT Photonic-Bands Package MPB(1)
NAME
mpb-split - compute eigenmodes with MPB using multiple processes
SYNOPSIS
mpb-split NUM-SPLIT [DEFINITION]... [CTLFILE]...
DESCRIPTION
mpb-split is a parallelizing front-end to MIT Photonic Bands (MPB). For a computation with several k points, it splits the list of k
points over multiple processes. Of course, this will only benefit you on a system where different processes will run on different proces-
sors, such as an SMP or a cluster with automatic process migration (e.g. MOSIX). mpb-split is actually a trivial shell script, though, so
you can easily modify it if you need to use a special command to launch processes on other processors/machines.
MIT Photonic Bands (MPB) is a free program to compute the band structures (dispersion relations) and electromagnetic modes of periodic
dielectric structures, and is applicable both to photonic crystals (photonic band-gap materials) and a wide range of other optical prob-
lems.
More information on MPB, including a detailed manual, can be found online at the MPB home page: http://ab-initio.mit.edu/mpb/
A typical invocation of mpb-split looks like:
mpb-split num-split foo.ctl >& foo.out
This causes mpb-split to process the control file foo.ctl, divide the k points into num-split equal chunks, run each list in a separate
process with MPB, and redirect the output (in order) to foo.out. (One typically redirects output to a file, as the output is verbose and
contains a number of comma-delimited datasets that one can extract by grepping.)
Overall, the behavior and arguments are the same as for mpb except that the first argument must be the integer num-split.
What mpb-split technically does is to set the MPB variable k-split-num to num-split and k-split-index to the index (starting with 0) of the
chunk for each process. If you want, you can use these variables to divide the problem in some other way and then reset them to 1 and 0,
respectively.
BUGS
Send bug reports to S. G. Johnson, stevenj@alum.mit.edu.
AUTHORS
Written by Steven G. Johnson. Copyright (c) 1999, 2000, 2001, 2002 by the Massachusetts Institute of Technology.
SEE ALSO
mpb(1), mpb-data(1)
MPB
March 13, 2002 MPB(1)