10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have been stuck in this requirement where my file contains the below format.
20150812170500846959990854-25383-8.0.0
"ABC Report" hp96880
"4952"
20150812170501846959990854-25383-8.0.0 End of run
20150812060132846959990854-20495-8.0.0
"XYZ Report" vg76452
"1006962188"... (6 Replies)
Discussion started by: Chinmaya Kabi
6 Replies
2. Shell Programming and Scripting
Hi
I know sed and awk has options to give range of line numbers, but
I need to replace pattern in specific lines
Something like
sed -e '1s,14s,26s/pattern/new pattern/' file name
Can somebody help me in this....
I am fine with see/awk/perl
Thank you in advance (9 Replies)
Discussion started by: dani777
9 Replies
3. Shell Programming and Scripting
hey guys,
I tried searching but most 'search and replace' questions are related to one liners.
Say I have a file to be replaced that has the following:
$ cat testing.txt
TESTING
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
ENDTESTING
This is the input file: (3 Replies)
Discussion started by: DeuceLee
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have catenated multiple output files (from a monte carlo run) into one big output file. Each individual file has it's own two line header. So when I catenate, there are multiple two line headers (of the same wording) within the big file. How do I use the sed command to search for the... (1 Reply)
Discussion started by: rebazon
1 Replies
5. Shell Programming and Scripting
Input:
hello hello
hello hello
monkey
donkey
hello hello
drink
dance
drink
Output should be:
hello hello
monkey
donkey
drink
dance (9 Replies)
Discussion started by: cola
9 Replies
6. Shell Programming and Scripting
3
10 20
10 100
100 10000
Output:
3
10 20
10 100
100 10000
---------- Post updated at 07:59 AM ---------- Previous update was at 07:56 AM ----------
sed '/^$/d' file doesn't work. (8 Replies)
Discussion started by: cola
8 Replies
7. UNIX for Dummies Questions & Answers
:confused:Hi,
I'm relativley new at unix so am having difficulties at the most basic of areas. I am trying using sed to make multiple lines into one line.
For example, i would like:
Mary
had
a
little
lamb
to look like this
Maryhadalittlelamb
so far i have tried
sed... (1 Reply)
Discussion started by: cavanac2
1 Replies
8. UNIX for Dummies Questions & Answers
hi i have a long sed command in a csh script that won't fit on 1 line.
how do i break it up correctly over multiple lines?
this doesn't seem to work in csh:
sed -e s/template/$IP.$NN/ \
-e s/NRG/6/ \
-e s/inputf/$IS.$NN/ \
-e s/SHIFT/10.0/ <template.egsinp > $IP.$NN.inp
i get:
sed:... (1 Reply)
Discussion started by: tuathan
1 Replies
9. Shell Programming and Scripting
file1 contains the following data
sssssssssss
firstline
secondline pppppppppp
ssssssssss
Using sed comamnd i am trying to delete firtsline secondline.
so, output should be
sssssssssss
pppppppppp
ssssssssss
I tried in the following the way, but it is not working.
sed ... (9 Replies)
Discussion started by: radha.kalivar
9 Replies
10. Shell Programming and Scripting
the file contains the follwoing lines
/*
* Copyright (C) 1995-1996 by XXX Corporation. This program
* contains proprietary and confidential information. All rights reserved
* except as may be permitted by prior written consent.
*
* $Id: xxx_err.h,v 1.10 2001/07/26 18:48:34 zzzz $
... (1 Reply)
Discussion started by: radha.kalivar
1 Replies