05-27-2010
Ok, plz tell me what is the I/P contents and what is the expected O/P. We will provide you the solution depending on that.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How would I delete white spaces in a specified file?
Also, I'd like to know what command I would use to take something off a regular expression, and put it onto another.
ie.
.
.
.
expression1 <take_off>
.
.
.
expression2 (put here)
.
.
.
Any help would be great, thanks! (10 Replies)
Discussion started by: cary530
10 Replies
2. Shell Programming and Scripting
hi all...
i have the next question:
i have a flat file with a lot of records (lines). Each record has 10 fields, which are separated by pipe (|). My problem is what sometimes, in the first record, there are white spaces (no values, nothing) in the beginning of the record, like this:
ws ws... (2 Replies)
Discussion started by: DebianJ
2 Replies
3. Shell Programming and Scripting
I have a variable that calls in a string from txt file. Problem is the string comes with an abundance of white spaces trailing it. Is there any easy way to trim the tailing white spaces off at the end? Thanks in advance. (9 Replies)
Discussion started by: briskbaby
9 Replies
4. Shell Programming and Scripting
Hi,
Can anybody suggest me how to combine two strings with two or more white spaces and assign it to a variable?
E.g.
first=HAI
second=HELLO
third="$first $second" # appending strings with more than one white spaces
echo $third
this would print
HAI HELLO
Output appears... (2 Replies)
Discussion started by: harish_oty
2 Replies
5. UNIX for Dummies Questions & Answers
Hi
I have a shell script that looks for running processes in order to kill them. The script (ksh) gets the PID of these processes using the following:
PROCS=`ps -fu ${USERID} | egrep "MONITOR" | grep -v grep | cut -d" " -f4`
However, I spotted an issue where PID's of different lengths... (3 Replies)
Discussion started by: mikem22
3 Replies
6. Shell Programming and Scripting
SHELL SCRIPT
Hi
I have a file in the following format
Mayank Sushant
Dheeraj Kunal
ARUN Samir
How can i replace the white space in between and replace them with a comma?? The resultant output should be
Mayank,Sushant
Dheeraj,Kunal
ARUN,Samir
i tried using
sed -e... (8 Replies)
Discussion started by: mayanksargoch
8 Replies
7. Shell Programming and Scripting
Hi everyone
I have a file looks like this
X01 1 JOE 20100312
X02 TOD 20100312
X03 3 SAM 20100312
I wrote a script to assign the values in 5 columns to 5 variables. When I use cut command to assign column 2 or 3, it skips it if it is a space (see below)
... (3 Replies)
Discussion started by: nimo
3 Replies
8. Shell Programming and Scripting
Hi,
I am having problem in deleting the leading spaces:-
cat x.csv
baseball,NULL,8798765,Most played
baseball,NULL,8928192,Most played
baseball,NULL,5678945,Most played
cricket,NOTNULL,125782,Usually played
cricket,NOTNULL,678921,Usually played
$ nawk 'BEGIN{FS=","}!a... (2 Replies)
Discussion started by: scripter12
2 Replies
9. Shell Programming and Scripting
Hello,
I have a Comma separated input file with one of the sample records as below:
-9223372036854477528,"834","834003325515BXNI00101012013C","5","PLAN_VALUE","PPO, General
Cable","C",20130101,99991231,"A","2012-12-25-13.58.14.434000","ZPL2 ","2012-12-25-13.58.14.434000","ZPL2 ... (4 Replies)
Discussion started by: Praveenkulkarni
4 Replies
10. Shell Programming and Scripting
I need to change the order of the columns of data that looks like this:
The original data is in 6 tab-separated columns.
FACTSHEET factsheet NN 1 5 DEP
WHAT what WP 2 3 SBJ
IS be VBZ 3 1 NMOD
AIDS AIDS NP ... (1 Reply)
Discussion started by: owwow14
1 Replies
BHOST(5) LAM FILE FORMATS BHOST(5)
NAME
bhost - LAM boot schema (host file) format
SYNTAX
#
# comments
#
<machine> [cpu=<cpucount>] [user=<userid>]
<machine> [cpu=<cpucount>] [user=<userid>]
...
DESCRIPTION
A boot schema describes the machines that will combine to form a multicomputer running LAM. It is used by recon(1) to verify initial con-
ditions for running LAM, by lamboot(1) to start LAM, and by lamhalt(1) to terminate LAM (note that wipe(1) has been deprecated by the
lamhalt(1) command).
The particular syntax of a LAM boot schema is sometimes called the "host file" syntax. It is line oriented. One line indicates the name
of a machine, typically the full Internet domain name, an optional number of CPUs available on that machine, and optionally the userid with
which to access it.
Common boot schema for a particular site may be created by the system administrator and placed in the installation directory under etc/.
They typically start with the prefix bhost. Individual users usually create their own boot schema, especially if the configurations are
simple.
EXAMPLE
Here is an example three node boot schema:
#
# example LAM host file
#
beowulf1.nd.edu cpu=2
beowulf2.nd.edu
beowulf2.nd.edu
somewhere.else.college.edu user=guest
Note that the "guest" ID is significant, since the user has an alternate login ID on somewhere.else.college.edu. Additionally note that
beowulf1 has a CPU count of 2 listed (a CPU count of 1 is assumed if it is not given). This value is used by mpirun(1), MPI_Comm_spawn(2),
and MPI_Comm_spawn_multiple(2) for the "C" (or CPU) notation that specifies how many ranks to start. This is particularly useful for run-
ning on SMP machines.
beowulf2 is listed twice, but has no specific CPU count listed. In this case, LAM will keep a running tally of the total number of CPUs
for that host. Hence, LAM will calculate that beowulf2 has two CPUs available for use. Calculating the number of CPUs by counting occu-
rances of a hostname is useful in a batch environment where a hostfile may list the same hostname multiple times, indicating that the batch
scheduler has allocated multiple CPUs for a single job (e.g., PBS operates this way).
For the above-mentioned schema, the command "mpirun C foo" would start five instances of the foo program; two on beowulf1, two on beowulf2,
and one on somewhere.else.
FILES
$LAMHOME/etc/bhost.def default boot schema file
SEE ALSO
lamboot(1), lamhalt(1), mpirun(1), MPI_Comm_spawn(1), MPI_Comm_spawn_multiple(1), recon(1), wipe(1)
LAM 6.5.8 November, 2002 BHOST(5)