10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi, In my previous post ( How to print lines from a files with specific start and end patterns and pick only the last lines? ), i have got a help to get the last select statement from a file, now i need to remove/exclude the output from main file:
Input File format:
SELECT
ABCD,
DEFGH,... (2 Replies)
Discussion started by: nani2019
2 Replies
2. Shell Programming and Scripting
Hello all,
I have a file like this
AA||
BB||
CC||
I want to remove the pipelines (||) from the last occurrance of them in file.
that means after removal my file should be like this
AA||
BB||
CC
how can we achieve this? (2 Replies)
Discussion started by: nnani
2 Replies
3. Shell Programming and Scripting
Hi All,
test file
Begin Script Run at Thu Mar 14 09:24:16 PDT 2013
tst_accounts: ws zip: WS_out_20130313.tar.gz dat: test_20130313.dat count: 63574 loaded: xx pre-merge: xx post-merge: xx timestamp: Thu Mar 14 09:30:42 PDT 2013
tst_accounts: ws zip: WS_out_20130313.tar.gz dat: s_20130313.dat... (6 Replies)
Discussion started by: bmk
6 Replies
4. Shell Programming and Scripting
how to Remove comma as last charector in end of last line of file:
example:
input file
---------------
aaaaaa,
bbbbbb,
cccc,
12345,
____________
output file :
-----------
aaaaaa,
bbbbbb, (6 Replies)
Discussion started by: RahulJoshi
6 Replies
5. Shell Programming and Scripting
Hi,
How to find the end of character in the file.
My requirement should be as below.1 is repeating 1 time ,2 is repeating 3 times...
type 1: 1
type 2: 3
type 3: 2
9f680177|20077337258|0|0|0|1000004647916|1
9f680177|20077337258|0|0|0|1000004647916|2
9f680177 20077337258 0 0 0... (5 Replies)
Discussion started by: bmk
5 Replies
6. Shell Programming and Scripting
I need to remove new line character from end of file.
Suppose here are content.
a|b|c|d|r
a|b|c|d|r
a|b|c|d|r
<new line>
that means file contains 4 lines but data is there in 3 lines.
so I want that only 3 lines should be there in file.
Please help (20 Replies)
Discussion started by: varun940
20 Replies
7. Shell Programming and Scripting
I am looking help in awk, quick overview. we will get feed from external system . The input file looks like below.
Detail Id Info Id Order Id STATUS Status Date FileDetail
99127942 819718 CMOG223481502 PR 04-17-2011 06:01:34PM... (7 Replies)
Discussion started by: dvrbabu
7 Replies
8. Shell Programming and Scripting
Hi all,
I have 2 files. One contains only 1 column and other one contains 2 columns, let say 1_col.txt and 2_col.txt respectively. Here, I will try to explain with an example.
Input files :
1_col.txt 2_col.txt
a a b
x a c
p ... (5 Replies)
Discussion started by: AshwaniSharma09
5 Replies
9. Shell Programming and Scripting
Hi I am working on a bash script and would know how to use cut or sed to remove
(F/.M/d h) from a text file.
Before
1 text to save (F/.M/d h)
after
1 text to save
Thanks in advance (5 Replies)
Discussion started by: pelle
5 Replies
10. Shell Programming and Scripting
1/p
----
A
B
C
A
C
o/p
---
B
A
C
From input file it should remove duplicates from end without changing order (5 Replies)
Discussion started by: lavnayas
5 Replies