08-20-2013
In sed, 's/\n//' only works if you do an 'N' to read a second line into the buffer.
Once you have the table into something like a csv file, you need to sort and you may need to deal with excess " and such optional encoding. If there are embedded linefeeds in columns, you need to encode them so lines are rows. If the rows are unique, comm is a good tool, else either diff or preprocess sorted through uniq -c and sed to make dups into unique lines with a count suffix before comm.
10 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
can anyone point me to a comparison of *nix file systems ?
i think i prefer a journalling fs
but i would like to see a comparison between several fs's before i make up my mind (2 Replies)
Discussion started by: cnf
2 Replies
2. Shell Programming and Scripting
I need some help which would probably be for most of you a simple script.
I need to read in the data from a .dat file and then compare avg to see who is the highest avg. Here is my script so far.
#!/bin/ksh
#reading in the data from lab3.dat
filename=$1
while read name o1 o2 o3 o4 o5 o6... (0 Replies)
Discussion started by: bluesilo
0 Replies
3. UNIX for Dummies Questions & Answers
Hi Guys
i need to write a script to check the file structure
I have added the the file headers in the configuration file and execute the file at the start of the script.
Now the function
checkFileStructure()
{
echo "Inside the function"
filetocheck=$1
fileheader=$2
if ]
then... (1 Reply)
Discussion started by: Swapna173
1 Replies
4. Shell Programming and Scripting
My input file:
data_5 Ali 422 2.00E-45 102/253 140/253 24
data_3 Abu 202 60.00E-45 12/23 140/23 28
data_1 Ahmad 256 7.00E-45 120/235 140/235 22
data_4 Aman 365 8.00E-45 15/65 140/65 20
data_10 Jones 869 9.00E-45 65/253 140/253 18... (12 Replies)
Discussion started by: patrick87
12 Replies
5. Shell Programming and Scripting
Does $((mathematical expression)) and $ mean the same? (7 Replies)
Discussion started by: proactiveaditya
7 Replies
6. Shell Programming and Scripting
I got three different file:
Part of File 1
ARTPHDFGAA
.
.
Part of File 2
ARTGHHYESA
.
.
Part of File 3
ARTPOLYWEA
.
. (4 Replies)
Discussion started by: patrick87
4 Replies
7. Shell Programming and Scripting
(5 Replies)
Discussion started by: number10
5 Replies
8. UNIX for Dummies Questions & Answers
hi guys
i need a program that can compare a value read from a com-port and one from the terminal.
can somebody help me???
using linux kernel 2.6.14-M5
can only use standard function in sh and bash... (5 Replies)
Discussion started by: metal005
5 Replies
9. Shell Programming and Scripting
hi all,
i have two files:
test1 contains : one two three four five (on separate lines)
test2 contains: one ten nine (on separate lines)
I want to compare two files, test1 against test2. if any word from test1 does not match test2 display it. can someone help me with a while loop on this.
... (4 Replies)
Discussion started by: sbk785
4 Replies
10. Shell Programming and Scripting
Hello folks,
I have two files, which have usernames, I want to see the contents of file1.txt which is missing in file2.txt and another comparison file2.txt contents which is missing in file1.txt. please suggest.
file1.txt
user
u2
u8
a9
p9
p3
u4
z8
aaa
ahe
oktlo (7 Replies)
Discussion started by: learnbash
7 Replies