473,503 Members | 6,354 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't do inplace edit without backup

1 New Member
Hi,

I am writing a command line perl program to convert a file in dos format to unix format.

I know that the following instruction executes successfully on one of the unix machine. I am trying to execute it through cygwin.

perl -pi -e 's/\r\n/\n/;' InputAndOutputFile.sh

But I get following error.
Can't do inplace edit without backup

I tried to run:
perl -pi 'junk.bak' -e 's/\r\n/\n/;' InputAndOutputFile.sh

It gives me
Can't open -e: No such file or directory.
Can't open s/\r\n/\n/;: No such file or directory.
Can't do inplace edit without backup.

error.

Any Idea how can this be resoled?

Thanks,
Varsha
Nov 27 '07 #1
1 19948
KevinADC
4,059 Recognized Expert Specialist
try:

Expand|Select|Wrap|Line Numbers
  1. perl -pi.bak -e 's/\r\n/\n/;' InputAndOutputFile.sh 
or:

Expand|Select|Wrap|Line Numbers
  1. perl -pi.bak -e "s/\r\n/\n/;" InputAndOutputFile.sh 
Nov 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
17526
by: news.verizon.net | last post by:
I'm working through the examples in Jeffrey E. F. Friedl's book 'Mastering Regular Expressions, 2nd Ed.'. I'm trying to work the example at the top of p. 53, but I'm attempting it in a command...
2
2520
by: Michael Orlando | last post by:
Any help would be greatly appreciated. My problem is that I need to set up a backup SQL Server 2000 machine which can be used in case of a failure to my primary. All databases (30 as of now)...
2
9372
by: Pavel | last post by:
Greetings to all - I'm having a problem processing xml with relative dtd URI specified using XSLT: <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE mydoc SYSTEM "my.dtd"> <mydoc> .......
9
8385
by: db2inst2 | last post by:
Hi all, I am in a situation to restore a DB just from the Files (No Backup Image) I have got all the files of NODE0000 directory. Platform WIN 2000 pro And db2 8.1 fp 2 Is it possible to...
4
6363
by: Brice Avila | last post by:
Hello, IHAC running DB2 7.1.1.93 on Solaris 8. When he tried restoring this instance from a different server (alternate client restore) he encountered: db2 => restore database dumbunny load...
4
2123
by: Terry | last post by:
I need some help refining an MS 2000 relational databse. I have created a simple relational database using two tables, 'Student Details', 'Exam Details' and two forms, 'Input/Edit Exam Details',...
22
4522
by: Saurabh Saxena | last post by:
can we write the program to write no 1 to n without using switch,do,while,for,goto,if and conditional operator where n will be input by user.
3
7415
by: Joey | last post by:
asp.net 2.0 VS2005 C# In my web app I added a gridview and then manually configured boundcolumns, for an in-session dataset to act as a datasource. Then I added an Edit commandfield. When I...
2
4495
by: mvsmsh | last post by:
Hi , How can I load without copy in UDB V8/AIX , I don't want copy or backup after load. Are there any command in UDB , like Z/OS DB2 "repair tablespace nocopypend" ?
0
7357
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7012
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3171
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1522
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
402
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.