08-25-2007
You can get this way
a=0
for file in `cat inputfile`
do
a=`expr $a + 1`
even=`expr $a%2|bc`
if [ $even -gt 0 ]
then
echo $file
fi
done
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Guys,
I need help in modifying a large text file containing more than 1-2 lakh rows of data using unix commands. I am quite new to the unix language
the text file contains data in a pipe delimited format
sdfsdfs
sdfsdfsd
START_ROW
sdfsd|sdfsdfsd|sdfsdfasdf|sdfsadf|sdfasdf... (9 Replies)
Discussion started by: manish2009
9 Replies
2. Shell Programming and Scripting
I need to delete rows based on the number of lines in a different file, I have a piece of code with me working but when I merge with my C application, it doesnt work.
sed '1,'\"`wc -l < /tmp/fileyyyy`\"'d' /tmp/fileA > /tmp/filexxxx
Can anyone give me an alternate solution for the above (2 Replies)
Discussion started by: Muthuraj K
2 Replies
3. Shell Programming and Scripting
Hi Experts,
I am working on HP-UX. I am new to shell scripting. I would like to have a shell script which will prefix:
1. "H|" before first row of my file and,
2. "T" for all other rows of the file.
For Example - File before running the script 20100430|4123451810|218.50|TC
20100430 ... (4 Replies)
Discussion started by: phani333
4 Replies
4. Shell Programming and Scripting
Friends ,
I have a large file and i need to insert a line after every line.I am actually unaware how to do it.Any help appreciated.
My File
control station *ATM* , qread $OSS.Jul13A.FI01 interval 1 intcount 1
control station *ATM* , qread $OSS.Jul13A.FI02 interval 1 intcount... (4 Replies)
Discussion started by: appu2176
4 Replies
5. Shell Programming and Scripting
hi,
i have 2 files.
file1:
1
2
3
4
5
6
file2:
a
b
c
d
e
f
g
h
i (5 Replies)
Discussion started by: vidyaj
5 Replies
6. Shell Programming and Scripting
Hi All,
I have a file which is like this:
rows.dat
1 2 3 4 5 6
3 4 5 6 7 8
7 8 9 0 4 3
2 3 4 5 6 7
1 2 3 4 5 6
I have another file with numbers like these (numbers.txt):
1
3
4
5
I want to read numbers.txt file line by line. The extract the row from rows.dat based on the... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies
7. UNIX for Dummies Questions & Answers
I have 2 files,
file01= 7 columns, row unknown (but few)
file02= 7 columns, row unknown (but many)
now I want to create an output with the first field that is shared in both of them and then subtract the results from the rest of the fields and print there
e.g.
file 01
James|0|50|25|10|50|30... (1 Reply)
Discussion started by: A-V
1 Replies
8. Shell Programming and Scripting
Hi I would like to move the first 1000 rows of my file into an output file and then move the last 1000 rows into another output file.
Any help would be great
Thanks (6 Replies)
Discussion started by: kylle345
6 Replies
9. Shell Programming and Scripting
Hi,
I have a big matrix with 1 million columns and 21 rows, which is a tab delimited file. I would like to print every alternate columns into a new file. For each row, the start column will be always the first column.
For example the input file
1 2 4 5 8 0 7 9
2 5 6 3 0 6 9 2
3 6 3 6 6 0... (3 Replies)
Discussion started by: Kanja
3 Replies
10. Shell Programming and Scripting
Hi,
I have a comma separated file. I would like to print every alternate columns into a new row.
Example input file:
Name : John, Age : 30, DOB : 30-Oct-2018
Example output:
Name,Age,DOB
John,30,30-Oct-2018 (3 Replies)
Discussion started by: Lini
3 Replies
LEARN ABOUT DEBIAN
abltobddcct
ABLTOBDDCCT(3) BDD functions ABLTOBDDCCT(3)
ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in
Paris, France.
Web : http://asim.lip6.fr/recherche/alliance/
E-mail : alliance-users@asim.lip6.fr
NAME
ablToBddCct - converts an ABL into a BDD within a circuit
SYNOPSYS
#include "logmmm.h"
pNode ablToBddCct(pC,expr)
pCircuit pC;
chain_list *expr;
PARAMETERS
pC Circuit in which is made the conversion
expr expression to convert
DESCRIPTION
ablToBddCct() constructs the graph that is computed from expr. This function provides the basic method for constructing easily the BDDs.
The applyBdd() function is called recursively by going through the ABL.
EXAMPLE
#include "mutnnn.h" /* mbk utilities */
#include "logmmm.h"
chain_list *expr;
pNode res;
pCircuit pC;
initializeBdd(SMALL_BDD);
pC = initializeCct("circuit 1",10,10);
addInputCct(pC,"a");
addInputCct(pC,"b");
/* let's suppose that expr = (OR (AND (NOT a) b) a) */
res = ablToBddCct(pC,expr);
displayBdd(res,1);
/* it will display
@res INDEX = 3 LOW = @nodeA HIGH = ONE
@nodeA INDEX = 2 LOW = ZERO HIGH = ONE
*/
destroyCct(pC);
destroyBdd(1);
SEE ALSO
log(1), bdd(1), abl(1), bddToAblCct(3).
BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory.
We need your feedback to improve documentation and tools.
ASIM
/LIP6 October 1, 1997 ABLTOBDDCCT(3)