10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file where every line includes four expressions with a caret in the middle (plus some other "words" or fields, always separated by spaces). I would like to extract from this file, all those lines such that each of the four expressions containing a caret appears in at least four different... (9 Replies)
Discussion started by: uncleMonty
9 Replies
2. UNIX for Dummies Questions & Answers
How do you write a script to ignore all lines except the --- dash lines and then remove --- dashes from the data in a text file?
Also how do you separate data in a text file with a tab (for example, column1 (software) and column2 (date) ) ?
Here is my scripts : I am getting errors in... (3 Replies)
Discussion started by: dellanicholson
3 Replies
3. UNIX for Advanced & Expert Users
Hi ,
i have a file with data as below.This is same file. But actual file contains to many rows.
i want to search for a string "Field 039 00" and delete that line and previous 3 lines in that file.. Can some body suggested me how can i do using either sed or awk command ?
Field 004... (7 Replies)
Discussion started by: vadlamudy
7 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
5. UNIX for Advanced & Expert Users
I have two files
a.txt
b.txt
I want to find a line in a.txt and replace by another line from b.txt
a.txt
asfsdfsfsfdfsf
asfwererfgdgf
wrerwetretfdg
b.txt
werdfgdfgf
werergfdgd
sfdfgfgfgfgg
i want to replace the 1st line of a.txt by 1st line of b.txt
i want out put as (5 Replies)
Discussion started by: rammm
5 Replies
6. Shell Programming and Scripting
Hi All,
I am having an abc.txt , which contains some digits
Eg:abc.txt
145
566
355
I want write shellscript in suchway that if any digit is greter than 1000 then it shuld display " text files contain digit, which is greater than 1000"
Please help me to do so
Thanks.. (8 Replies)
Discussion started by: pspriyanka
8 Replies
7. UNIX for Dummies Questions & Answers
Hello all, new to unix and have just found the forum.
I think I will be here quite often, and hope that in time i will be able to provide soem help, role on not being a newbie anymore :)
I have a question which iI am hoping someone could help me with.
If i have a file with lines in in thus... (8 Replies)
Discussion started by: grom
8 Replies
8. Shell Programming and Scripting
Hi all,
Sorry for the title, I was unsure how to word my issue. I'll get right to the issue. In my text file, I need to find all lines with the same data in the first field. Then I need to create a file with the matching lines merged into one. So my original file will look something like... (4 Replies)
Discussion started by: rstev39147
4 Replies
9. Shell Programming and Scripting
I have a file a.xml
some portion of the file is given below.But the file format is same.
CTYPE available_templates SYSTEM './available_templates.dtd'>
<available_templates>
<template_file name="Approve External" path="core/approve/bin"
<command_list>
<command... (1 Reply)
Discussion started by: millan
1 Replies
10. Shell Programming and Scripting
Hi All,
I need to print the lines after 2nd line irrespective of the number of lines in file
if the file contents are like below
----------
root:!:0:0::/root:/usr/bin/ksh
daemon:!:1:1::/etc:
bin:!:2:2::/bin:
sys:!:3:3::/usr/sys:
adm:!:4:4::/var/adm:
uucp:!:5:5::/usr/lib/uucp:... (6 Replies)
Discussion started by: ram1729
6 Replies