Sponsored Content
Full Discussion: Print output as columns
Top Forums Shell Programming and Scripting Print output as columns Post 302807575 by onesuri on Wednesday 15th of May 2013 02:50:18 AM
Old 05-15-2013
Print output as columns

Normal grep is not working to get the output.

Code:
Sample Input:

newjob: abc
command name: a=b+c
newjob: bbc
command name: c=r+v
newjob:ddc
newjob:kkc
command name: c=l+g
newjob:mdc
newjob:ldc
newjob:kjc
command name: u=dl+g
newjob:lkdc
newjob:lksdc
command name: o=udl+g

Sample output:

NEWJOB~COMMAND
abc~a=b+c
bbc~c=r+v
ddc~
kkc~c=l+g
mdc~
ldc~
kjc~u=dl+g
lkdc~
lksdc~o=udl+g

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

compare columns from seven files and print the output

Hi guys, I need some help to come out with a solution . I have seven such files but I am showing only three for convenience. filea a5 20 a8 16 fileb a3 42 a7 14 filec a5 23 a3 07 The output file shoud contain the data in table form showing first field of... (7 Replies)
Discussion started by: smriti_shridhar
7 Replies

2. Shell Programming and Scripting

want to print output if u have rows and columns

U have a file File 1 0.3 0.2 0.4 0.3 0.8 0.11 0.22 0.4 0.23 0.45 0.56 0.78 0.98 0.11 0.32 0.2 0.4 0.45 0.54 0.2 0.33 0.44 0.21 0.22 0.98 0.8 0.2 0.34 0.54 0.98 0.12 0.1 0.22 0.32 0.34 0.89 0.22 File 2 rows columns 3 1 2 3 4 2 5 ... (8 Replies)
Discussion started by: cdfd123
8 Replies

3. Shell Programming and Scripting

How to print first 'n' columns?

Hello All, I have a file of 1000 columns. I need to print only the first 100 columns in to a new file. I have tried with the following code awk -F '{ for(i=0; i<=100; i++) {printf $i}' inputfile > outputfile But this is not working, I need the output file also of the same format of the... (4 Replies)
Discussion started by: Fredrick
4 Replies

4. UNIX for Advanced & Expert Users

Print rows into columns

Hi, I required to print all rows into columns(some comma separated or else) till a pattern match found. Using Solaris UNIX scripting my input is like abc def ghi jkl mno END pqr stu vwx yz 123 END ... ... (7 Replies)
Discussion started by: vikash.rastogi
7 Replies

5. Shell Programming and Scripting

Awk script to run a sql and print the output to an output file

Hi All, I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file. Can you anyone pls let me know how do I do it and execute the awk script? Thanks. (4 Replies)
Discussion started by: adept
4 Replies

6. Shell Programming and Scripting

match two key columns in two files and print output (awk)

I have two files... file1 and file2. Where columns 1 and 2 of file1 match columns 1 and 2 of file2 I want to create a new file that is all file1 + columns 3 and 4 of file2 :b: Many thanks if you know how to do this.... :b: file1 31-101 106 0 92 31-101 106 29 ... (2 Replies)
Discussion started by: pelhabuan
2 Replies

7. Shell Programming and Scripting

Match two columns from two files and print output

Hello, I have two files which are of the following format File 1 which has two columns Protein_ID Substitution NP_997239 T53R NP_060668 V267M NP_058515 P856A NP_001206 T55M NP_006601 D371Y ... (2 Replies)
Discussion started by: nans
2 Replies

8. Shell Programming and Scripting

Compare columns of multiple files and print those unique string from File1 in an output file.

Hi, I have multiple files that each contain one column of strings: File1: 123abc 456def 789ghi File2: 123abc 456def 891jkl File3: 234mno 123abc 456def In total I have 25 of these type of file. (5 Replies)
Discussion started by: owwow14
5 Replies

9. UNIX for Dummies Questions & Answers

Print Matches to New Columns

Hi all, I have a problem that I'm struggling to resolve. I have two files that look like this: File 1 654654654 3 987987987 2 321321321 1 File 2 14NS0064 654654654 14NS0054 654654654 14NS0032 654654654 14NS0090 987987987 14NS0093 987987987 14NS0056 321321321 As you may notice,... (2 Replies)
Discussion started by: winkleman
2 Replies

10. UNIX for Beginners Questions & Answers

How to use "awk" to print columns from different files in separate columns?

Hi, I'm trying to copy and paste the sixth column from a bunch of files into a single file having each column pasted in separate columns (and not one after each other in just one column.) I tried this code but works only partially because it copied and pasted 50 rows of each column... (6 Replies)
Discussion started by: Frastra
6 Replies
mdc(4)							     Kernel Interfaces Manual							    mdc(4)

Name
       mdc - DS5100 serial line driver

Syntax
       device	 mdc0	  at ibus?     vector mdcintr
       device	 mdc1	  at ibus?     vector mdcintr
       device	 mdc2	  at ibus?     vector mdcintr

Description
       A  DS5100 base system (mdc0) provides four asynchronous ports.  An optional asynchronous card (mdc1 and mdc2 ) can be added to supply eight
       additional ports.

       The mdc ports are used as follows:

       Port    Usage			  Connector

       0       Console port		  6-pin MMJ on CPU board
       1       Local terminal		  6-pin MMJ on CPU board
       2       Full modem control port	  25-pin D-Sub on CPU board
       3       Local terminal		  6-pin MMJ on CPU board

       An optional asynchronous board provides an additional eight lines:

       4       Local terminal		  6-pin MMJ
       5       Local terminal		  6-pin MMJ
       6       Full modem control port	  25-pin D-Sub
       7       Local terminal		  6-pin MMJ
       8       Local terminal		  6-pin MMJ
       9       Local terminal		  6-pin MMJ
       10      Local terminal		  6-pin MMJ
       11      Local terminal		  6-pin MMJ

       The console baud rate is set to 9600 baud by default.  You can change this by setting the baud environment variable  from  console  prompt.
       Each  communication  port  from	the  serial  line controller behaves as described in the reference page and can be set to run at any of 16
       speeds.	For the encoding, see

       You can establish the state of port 2 (port 6) by specifying either modem or nomodem as part of the file entry.

Restrictions
       The speed default is to 9600 baud on the console port.  The console device must be set for 8-bit character length with one stop bit and	no
       parity. The driver enforces these restrictions; that is, changing speeds with the command may not always work on console ports.

Files
       Console terminal

       Full modem control or local terminal

See Also
       console(4), devio(4), tty(4), ttys(5), MAKEDEV(8)

								       RISC								    mdc(4)
All times are GMT -4. The time now is 03:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy