10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I need to order these lines from a txt file my file looks like this
IMSI ........................ 1234567890
APN ......................... INTERNET.COM
APN ......................... MMS.COM
APN ......................... WAP.COM
APN ......................... BA.COM
IMSI... (4 Replies)
Discussion started by: alone77
4 Replies
2. Shell Programming and Scripting
Consolidate several lines of a CSV file with firewall rules
Hi guys.
I have a CSV file, which I created using an HTML export from a Check Point firewall policy.
Each rule is represented as several lines, in some cases. That occurs when a rule has several address sources, destinations or... (4 Replies)
Discussion started by: starriol
4 Replies
3. Shell Programming and Scripting
I have a file in which the data is stored in pairs of lines. The first line (beginining with ">") is a header, the second line is a sequence.
I would like to sort the file by species name. Desired output for the example file:
I can use
sort -t'_' -k2
to alphabetize headers in the... (1 Reply)
Discussion started by: pathunkathunk
1 Replies
4. Shell Programming and Scripting
Hi, need help in sorting lines between strings "<section status = “ole-service”>" and "</section>" in alphabetical order, based on the text in red. Hoping for an AWK or SED solution. Thank you.
...
<section status = “ole-service”>...
<p service = "OOO">XZZ</p>
<p service = "AAA">AAA... (3 Replies)
Discussion started by: pioavi
3 Replies
5. Shell Programming and Scripting
I need to extract selected lines from a log file, I can use grep to pull one line matching 'x' or matching 'y', how can I run through the log printing both matching lines in order top to bottom.
i.e
line 1 xyz - not needed
line 2 User01 - needed
line 3 123 - not needed
line 4 Info - needed... (2 Replies)
Discussion started by: rosslm
2 Replies
6. Shell Programming and Scripting
This seems to be a question whose answer uses sed or awk.
For a file like:
a
b
c
d
e
How to swap the order of the line pairs, to end up with:
b
a
d
c
e
All lines from the original file need to wind up in the output file. (8 Replies)
Discussion started by: rd5817
8 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. Shell Programming and Scripting
how can i reverse the line order in text files?
(but total number of the lines is not constant )
for example i have a file like this:
line1
line2
line3
.
.
lineN
i wantto make it like this:
lineN
.
.
.
line3 (26 Replies)
Discussion started by: gfhgfnhhn
26 Replies
9. Shell Programming and Scripting
Hi guys,
I am stuck on a simple issue but couldn't find a simple solution. If you have any ideas please help.
I have two files : -
FILE1
Tue 09/12 Lindsey
Wed 09/13 Randy
Thu 09/14 Susan
Fri 09/15 Randy
Sat 09/16 Lindsey
Sun ... (2 Replies)
Discussion started by: sam_2921
2 Replies
10. UNIX for Advanced & Expert Users
Hi all,
I have to remove duplicate lines in a file without chainging the order.for eg if i have a record
pqr
def
abc
lmn
pqr
abc
mkh
hgf
the output should be
pqr
def
abc
lmn
mkh
hgf (7 Replies)
Discussion started by: abhi.roy03
7 Replies