10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Gents,
Is there the chance to remove part of the file,
Taking in consideration this condition.
For each record the first row start with the string % VE
should be 56 rows for each records..
first row = % VE
last row = % sw
total 56 rows for each record.
Then in the case that the... (4 Replies)
Discussion started by: jiam912
4 Replies
2. Shell Programming and Scripting
Hi Gurus,
I have file name like:
abcd.20131005.dat
I need to remove mid part of data
final name should be
abcd.dat
thanks in advance (2 Replies)
Discussion started by: ken6503
2 Replies
3. Shell Programming and Scripting
sed -e '1d' -e 's/^\(]\{2\}\)-\(]\{3\}\)-\(]\{4\}\).*/"0000020\1\200\3"\,/g' abc.txt
This script returns many duplicates due to the duplciates in the .txt file.
i.e.
...
"000002012149000060",
"000002012149000064",
"000002012149000064",
"000002012149000064",
"000002012149000064",... (9 Replies)
Discussion started by: Daniel Gate
9 Replies
4. Shell Programming and Scripting
Greetings everyone. Right now I am working on a script to be used during automated deployment of servers. What I have to do is remove localhost.localdomain and localhost6.localdomain6 from the /etc/hosts file. Simple, right? Except most of the examples I've found using sed want to delete the entire... (4 Replies)
Discussion started by: msarro
4 Replies
5. Shell Programming and Scripting
I have a text file with delimiter "|" and sometimes the zipcode is in "5th" column or "6th" column. I want to scan the file and remove the "-2323" from the zipcode which has zip+4 digits
From
blah|blah|foo|bar||blah|945523-232|USA
blah|blah|foo|bar||blah|foo|94555-2323|USA
To... (8 Replies)
Discussion started by: gubbu
8 Replies
6. UNIX for Dummies Questions & Answers
I've shell script where i used the below command to take the line which contains patterns.
sed -n "/$year 05:/,/$year 17:/p" trace.log | grep -f patterns.txt > output.log
This was working fine for long time, but now a days this script is not working with and throwing error like
sed:... (8 Replies)
Discussion started by: senthil.ak
8 Replies
7. Shell Programming and Scripting
Hello,
I would like to remove a range from a file with sed or any script command that is appropriate
The section start by and finish by and I would like to keep line
Could you tell me which command I should type ?
Thanks a lot,
Franck
My input file is like this... (1 Reply)
Discussion started by: mfranck
1 Replies
8. Shell Programming and Scripting
I have an xml file, from where I need to take out Application2 entries and keep the others. I need to remove from <product> to </product> and the key element to look for while removing should be <application> as other pairs can be same for others.
<product>
... (10 Replies)
Discussion started by: chiru_h
10 Replies
9. Shell Programming and Scripting
Hi,
Is it possible to remove the first part of the file name using find.
i.e i have something like 2006abc.txt , 1007bed.txt etc,
I wanna rename them to abc.txt , bed.txt
I tried some stupid way..
find . -name '*.txt' -exec mv {} `cut -f2-5 -d"_" {}` \;
somehow iam not getting it.
... (3 Replies)
Discussion started by: braindrain
3 Replies
10. HP-UX
Hi Guys here I am again,
I have two files in a specified location.
Location ex: /opt/xdm/input/
input file names: 1. abc_app.yyyymmdd.dtd
2. abd_app.yyyymmdd.dtd
I need to build a code that reads the files from the location based on the oldest date and cuts the date part... (5 Replies)
Discussion started by: ruthless
5 Replies