10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
awk 'BEGIN{print "<table>"} {print "<tr>";
for ( i=1;i<NF;i++) print " <td>" $I "</td>";
print "</tr>"}
END{print " </table>"}' <file name > (6 Replies)
Discussion started by: Himanshu1
6 Replies
2. UNIX for Dummies Questions & Answers
This could be a really dummy question.
I have a log text file.
What unix command to extract line from specific string to another specific string.
Is it something similar to?:
more +/"string" file_name
Thanks (4 Replies)
Discussion started by: aku
4 Replies
3. Shell Programming and Scripting
Hell,
I want to grep certain word from file and display above 2 lines and after two lines.
Here is the content of sample file.
Mar 14, 2013 12:56:59 AM Agent.Agent SendTo
INFO: Connection to server:7041 - Credential Transmit Successesful
Mar 14, 2013 8:54:21 AM cgent SendTo
WARNING:... (7 Replies)
Discussion started by: balareddy
7 Replies
4. Shell Programming and Scripting
Hi,
Please have a look on below records.
STG_HCM_STATE_DIS_TAX_TBL.1207.Xfm: The value of the row is: EMPLID = 220677 COMPANY = 919 BALANCE_ID = 0 BALANCE_YEAR = 2012
STG_HCM_STATE_DIS_TAX_TBL.1207.Xfm: ORA-00001: unique constraint (SYSADM.PS_TAX_BALANCE) violated
... (4 Replies)
Discussion started by: Sachin Lakka
4 Replies
5. UNIX for Dummies Questions & Answers
Dear all,
Greetings.
I would like to ask for your help to extract lines with specific words in addition 2 lines before and after these lines by using awk or sed.
For example, the input file is:
1 ak1 abc1.0
1 ak2 abc1.0
1 ak3 abc1.0
1 ak4 abc1.0
1 ak5 abc1.1
1 ak6 abc1.1
1 ak7... (7 Replies)
Discussion started by: Amanda Low
7 Replies
6. Shell Programming and Scripting
I want to get a file together that lists router name and IP address of an interface together like so...
SOMERTR1A 10.10.10.20
SOMERTR1B 10.10.10.30
OTHRRTR1A 192.168.1.120
The file I'm trying to extract the text from looks like the below:
SOMERTR1A#show run int Lo0 | i add
... (5 Replies)
Discussion started by: branrobi
5 Replies
7. Shell Programming and Scripting
I hava a file with following data:
number|CREDIT_ID|NULL
date|SYS_CREATION_DATE|NULL
varchar2|GGS_COMMIT_CHAR|NULL
varchar2|GGS_OP_TYPE|NULL
number|GGS_SCN|NULL|
number|GGS_LOG_SEQ|NULL
number|GGS_LOG_POS|NULL
number|GGS_ORACREC_SCN|NULL
varchar2|BATCH_ID|NULL
char|GGS_IMAGE_TYPE|NULL
... (6 Replies)
Discussion started by: kolesunil
6 Replies
8. UNIX for Dummies Questions & Answers
are there any basic commands that can display lines 99 - 101 of the /etc/passwd file?
I'm thinking use of head and tail, but I forget what numbers to use and where to put /etc/passwd in the command. (2 Replies)
Discussion started by: raidkridley
2 Replies
9. Shell Programming and Scripting
Hi all,
I need help in doing this scenario. I have two files with multiple lines. I want to compare these two files but ignoring the lines which have words like Tran, Loc, Addr, Charge. Also if i have a word Credit in line, i want to tokenize (i.e string after character "
... (2 Replies)
Discussion started by: jakSun8
2 Replies
10. UNIX for Dummies Questions & Answers
All,
I have a file ABC.TXT which has two records:
12345 19.93 34.94
12345 94.84 10.48
If do the following command and
grep '12345' ABC.TXT >> test1.txt
If I look at the output of test1.txt I appears as follows:
12345 19.93 34.94 12345 94.84 10.48
I... (5 Replies)
Discussion started by: kingofprussia
5 Replies