dear all,
i'm new to unix and i try to figure out the best case for making list of vertical text to become horizontal and skip the line 1 and 2.
example text :
Data DATE XXXXX
MAX
47
53
49
51
48
48
7
46
51
8
25
I want to grep or any other way to make it like this :
47 53 49 51 48 48 7 46 51 8 25
so i dont want the Data DATE XXXXX & MAX
can u tell me how to do it, what is the best process to do this? :wall:
$ sed '1,2d' infile | xargs
hi its works but after the vertical number there are other lines, how to skip the other lines.
example :
Data DATE XXXXX
MAX
47
53
49
51
48
48
7
46
51
8
25
abcdefgasdfghjklwertyuiop
abcdefgasdfghjklwertyuiop
abcdefgasdfghjklwertyuiop
abcdefgasdfghjklwertyuiop
abcdefgasdfghjklwertyuiop
abcdefgasdfghjklwertyuiop
abcdefgasdfghjklwertyuiop
abcdefgasdfghjklwertyuiop
how to exclude the abcdefgasdfghjklwertyuiop ?
$ awk '!/abcdefg/' infile | sed '1,2d' | xargs
$sed '/.*[^0-9].*/d' FILE_NAME | xargs
one more ..
$ grep -vi "^[a-z]" infile | xargs
is it possible to limit the result just until n lines?
example :
Data DATE XXXXX
MAX
47
53
49
51
48
48
7
46
51
8
25
abcdefgasdfghjklwertyuiop
abcdefga123ertyuiop
abcde456fghjklwertyuiop
abcd756756ghjklwertyuiop
abcdefg78978978tyuiop
abcdefgasdfghjklwertyuiop
abcdefgasdfg675645rtyuiop
a12312dfghjklwertyuiop
I want the result to be :
47 53 49 51 48 48 7 46 51 8 25
line 1 and 2 are gone and line 14 until n will not be appear in result 
---------- Post updated at 05:03 PM ---------- Previous update was at 04:46 PM ----------
tested and this works fine, thanks