10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a directory like below. Need help with Perl to delete all files under test1 except the one passed as parameters.The parameters will
always be the directories under test1 in the format below.
EX:
dir1/abc.txt,dir2/test.xml,dir3/dfb.txt,dir4/text.xml
test1
... (5 Replies)
Discussion started by: gaurav99
5 Replies
2. Shell Programming and Scripting
Hi,
I have 500 MB of file.
I want to retain first line and last line of the file.
I am unaware of deleting lines from a file in PERL.
How can i do it in PERL?
Regards
VANITHA (3 Replies)
Discussion started by: vanitham
3 Replies
3. Shell Programming and Scripting
I have a Unix file with 200,000 records, and need to remove all records from the file that have the character ‘I' in position 68 (68 bytes from the left). I have searched for similar problems and it appears that it would be possible with sed, awk or perl but I do not know enough about any of these... (7 Replies)
Discussion started by: joddo
7 Replies
4. Shell Programming and Scripting
input:
donkey
monkey
dance
drink
output should be:
donkey
monkey (8 Replies)
Discussion started by: cola
8 Replies
5. Shell Programming and Scripting
How to delete last row in the file in PERL.
file1 has
a.output
b.output
c.output
d.output
e.output
expected output is
a.output
b.output
c.output
d.output (1 Reply)
Discussion started by: adaleru
1 Replies
6. Shell Programming and Scripting
Dear Friends,
I need urgent help from u..
I have two files,file1 & file 2..
file1 have a existing data of file2.So i want to delete those existing datas from file1 (which contain the data from file1)
My file1 like this
rs39348 1 1045729 A G 0.1791 0.2054 0.84 ... (3 Replies)
Discussion started by: sureshraj
3 Replies
7. Shell Programming and Scripting
Hi
I need a perl onliner to delete a line in a file starting with few words.
Example
file.txt
----------
my name is don
I live in London
I am woking as engineer
I want to delete a line starting with 'I live in' using perl oneliner and in place edit with out temporary files
Thanks... (2 Replies)
Discussion started by: ammu
2 Replies
8. Shell Programming and Scripting
Hi ,
I've a perl script to convert .xls to .csv .After conversion I want to delete first 28 and the last row from .csv file.Is there any efficent way to achive this both together.
I'm deleting first 28 rows by using folllowing my perl code:
exec " tail -n+28 infile.csv > outfile.csv
... (7 Replies)
Discussion started by: ajaypatil_am
7 Replies
9. Shell Programming and Scripting
Hi All,
Im having a file named logserver.txt. I want a perl script to take a backup of that file, along with the datestamp; move the file to a different location or empty the contents of the file after backup.
Remember, the file gets generated when the related service starts. My condition is... (14 Replies)
Discussion started by: ntgobinath
14 Replies
10. Shell Programming and Scripting
Is it possible to delete the last line in a file usin awk or perl? (4 Replies)
Discussion started by: suman_jakkula
4 Replies