473,778 Members | 1,901 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/;' InputAndOutputF ile.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/;' InputAndOutputF ile.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 19980
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
17544
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 prompt window (I'm using Windows 2000 pro). I enter: perl -p -i -e 's/sysread/read/g' substitute.txt I get this error message: "Can't do inplace edit without backup." Any ideas?
2
2534
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) must be an up to the minute exact copy of production and include most recent changes in data as well as any structure changes (Tables, Views, SP's, Triggers, Users . . etc). When I tried this using Transactional Replication, the replication...
2
9404
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> .... </mydoc>
9
8417
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 restore the DB. How do i do it?
4
6404
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 /usr/openv/netbackup/bin/nbdb2.so open 1 sessions taken at 20041022181323 buffer 1024 replace existing without prompting
4
2147
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', 'Input/Edit Student Details'. 'Student Details' has a field called 'Log Book No' (no duplicates allowed) and this is the Primary Key. 'Exam Details' also has a field called 'Log Book No' (duplicates allowed) and has no Primary Key, (as each...
22
4568
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
7427
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 run the page, in each row in the gridview I see the data and the Edit and Delete links just fine. But when I click an edit link, the post posts back and nothing else happens...I do not get textboxes/checkboxes for the columns in the
2
4519
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
9471
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10302
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10136
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8958
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7478
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5372
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4036
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 we have to send another system
2
3631
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2867
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.