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 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
3. Shell Programming and Scripting
hi,
How can i count the number of lines after the first line in a flat file in unix?
Say i have a flat file with a header like:
Student Name Student ID ....
Tnx (7 Replies)
Discussion started by: reignangel2003
7 Replies
4. Shell Programming and Scripting
Hi guys,
I have a file which has random records like mentioned below
emcpower28a
pci@3,03 (disk physical name)
pci@3,04
emcpower9a
pci@1,03
pci@2,03
pci@3,01
pci@4,03
there could be any number of disk names for any LUN (emc...) So, I want a solution to count disk names for its... (12 Replies)
Discussion started by: prashant2507198
12 Replies
5. Shell Programming and Scripting
I have a file that needs to be parsed into multiple files every time there line contains a number 1. the problem i face is the lines are random and the file size is random. an example is that on line 4, 65, 187, 202 & 209 are number 1's so there has to be file breaks between all those to create 4... (6 Replies)
Discussion started by: darbs121
6 Replies
6. Shell Programming and Scripting
hi,
i've many unload files with delimiter '|'. I'm trying to load them to the specific tables from those unl's. The problem here is, some unl's are corrupted. To be exact, some files doesnt seem to have the exact number of fields as in the table. So im trying to identify the corrupted... (6 Replies)
Discussion started by: dvah
6 Replies
7. Shell Programming and Scripting
I want to sort lines by how many times a string occurs in each line (the most times first).
I know how to do this in two passes (add a count field in the first pass then sort on it in the second pass).
However, can it be done more optimally with a single AWK command? My AWK has improved... (11 Replies)
Discussion started by: Michael Stora
11 Replies
8. Shell Programming and Scripting
I am writing a package manager in BASH and I would like a small snippet of code that finds lines that match exact input and count them. For example, my file contains:
xyz
xyz-lib2.0+
xyz-lib2.0
xyz-lib1.5
and "grep -c xyz" returns 4.
The current function is:
# $1 is the package name.... (3 Replies)
Discussion started by: cooprocks123e
3 Replies
9. Shell Programming and Scripting
i have a file a.txt and following is only one portion.
I want to search <branch value="/dev36/AREA/" include="yes"></branch> present in between
<template_file name="Approve External" path="core/approve/bin" and </template_file>
where the no of lines containing "<branch value= " is increasing ... (2 Replies)
Discussion started by: millan
2 Replies
10. UNIX for Dummies Questions & Answers
I need help to find out the number of lines in a file which exists in remote machine.
I the remote machine, auto login is enabled. So I do not need to worry about the username or password. But the problem is, I do not know how I can find out the line count once I get the FTP prompt. (1 Reply)
Discussion started by: Rita_questions
1 Replies