Sponsored Content
Top Forums Shell Programming and Scripting No such file or directory error Post 303030956 by Scrutinizer on Tuesday 19th of February 2019 10:38:40 PM
Old 02-19-2019
My guess is your script contains carriage return characters. Perhaps it has been edited on a Windows host?
You can remove them with a dos2unix utility if present or with the following command:

Code:
tr -d '\r' < oldfile > newfile


Last edited by RudiC; 02-21-2019 at 05:12 AM.. Reason: Changed QOUTE to CODE tags.
These 2 Users Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. Linux

error: rw/regexp.h: No such file or directory

Hello every one, i am trying to compile c++ modules. while compiling a module i am getting the following error. cdbh_RecordStore.C:32:23: error: rw/regexp.h: No such file or directory make: *** Error 1 I googled for the solution , i found that this is a Rogue wave class. actually... (0 Replies)
Discussion started by: mannam srinivas
0 Replies

2. UNIX for Dummies Questions & Answers

SFTP error: no such file or directory

Hi All, I am using a shell script for SFTPing the files to target server. The problem which I am facing is that even if the files are not transferred, the script finishes successfully. I want the script to fail in case the remote directory does not exists. The script which I am using is as... (1 Reply)
Discussion started by: shalini@@@
1 Replies

3. Linux

Error crt0.o no such file or directory

Hi, I am installing gcc cross compiler for x86_64. After installation when i am compiling simple program, i am getting error as "/usr/cross/lib/gcc-lib/x86_64-pc-elf/3.2.3/../../../../x86_64-pc-elf/bin/ld: cannot open crt0.o: No such file or directory" Please tell me how to resolve this... (1 Reply)
Discussion started by: Mandar123
1 Replies

4. UNIX for Dummies Questions & Answers

Error: GL/glut.h: No such file or directory

hi, I get this error when I compile my source on mac Leopard. is because I need to configure openGL path ? Monitor.h:15:60: error: GL/glut.h: No such file or directory Monitor.h:16:60: error: GL/gl.h: No such file or directory Monitor.C: In function 'void display2()': Monitor.C:77:... (0 Replies)
Discussion started by: aneuryzma
0 Replies

5. UNIX for Dummies Questions & Answers

SCP error: No such file or directory

Hi, I am trying to do scp using the following script: #!/usr/local/bin/bash BUILDDATE=20120220 for line in `cat arch_host_plat_src_dest` do src=`echo $line | cut -d: -f4` dest=`echo $line | cut -d: -f5` echo scp -p /builds/${BUILDDATE}/Integration/$src ... (1 Reply)
Discussion started by: Technext
1 Replies

6. Shell Programming and Scripting

Error : No such file or directory

Hi, I have issued the below command to remove directories under a specific path, it removes them fine. But atlast it tries to find the same directory and fails. Directories: /root/app/dir /root/app/dir/files/ /root/app/dir/backup/ /root/app/dir/archive/ Command: find... (1 Reply)
Discussion started by: vel4ever
1 Replies

7. Shell Programming and Scripting

No such file or directory error

Hi, After executing load_data.sh script , it completes the steps in script but give following error.Please let me know how to fix it. ./load_data.sh: ' missing ./load_data.sh: 0: not found for i in 1 2 3 do ###some processing#### DLOG=$( eval echo \${TXPCY_${i}_DATA_FILE_LOG} )... (4 Replies)
Discussion started by: sandy162
4 Replies

8. Solaris

/bin/find: stat() error <File> : No such file or directory

Hi, I am getting below error in Solaris 10 SPARC when trying to issue a search on /var/tmp partition Below is the query /bin/find /var/tmp/ -type f -atime +1 Below is the result /bin/find: stat() error <File> : No such file or directory (28 Replies)
Discussion started by: prash358
28 Replies

9. Shell Programming and Scripting

No Such File or Directory error

Hi! I just recently started messing around with Unix, but I've come upon one problem multiple times. Whenever I try to run a shell script, for example; #! /bin/bash #-------------------------------------- # example1 #-------------------------------------- echo "Hello, World!" I... (5 Replies)
Discussion started by: SoapilyProne
5 Replies

10. Shell Programming and Scripting

Weird Error (: No such file or directory)

Hi Everyone, I am trying to make this script to use, to find out the DAHDI channel status. Every thing works fine, I even get proper results, however I have this weird error that comes along. Can someone please help me. Thanks a lot. #!/bin/bash # Color to set the test to when a channel is... (3 Replies)
Discussion started by: jeetz
3 Replies
dos2unix(1)							   User Commands						       dos2unix(1)

NAME
dos2unix - convert text file from DOS format to ISO format SYNOPSIS
dos2unix [-ascii] [-iso] [-7] [-437 | -850 | -860 | -863 | -865] originalfile convertedfile DESCRIPTION
The dos2unix utility converts characters in the DOS extended character set to the corresponding ISO standard characters. This command can be invoked from either DOS or SunOS. However, the filenames must conform to the conventions of the environment in which the command is invoked. If the original file and the converted file are the same, dos2unix will rewrite the original file after converting it. OPTIONS
The following options are supported: -ascii Removes extra carriage returns and converts end of file characters in DOS format text files to conform to SunOS require- ments. -iso This is the default. It converts characters in the DOS extended character set to the corresponding ISO standard charac- ters. -7 Converts 8 bit DOS graphics characters to 7 bit space characters so that SunOS can read the file. On non-i386 systems, dos2unix will attempt to obtain the keyboard type to determine which code page to use. Otherwise, the default is US. The user may override the code page with one of the following options: -437 Use US code page -850 Use multilingual code page -860 Use Portuguese code page -863 Use French Canadian code page -865 Use Danish code page OPERANDS
The following operands are required: originalfile The original file in DOS format that is being converted to ISO format. convertedfile The new file in ISO format that has been converted from the original DOS file format. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWesu | +-----------------------------+-----------------------------+ SEE ALSO
unix2dos(1), ls(1), attributes(5) DIAGNOSTICS
File filename not found, or no read permission The input file you specified does not exist, or you do not have read permission. Check with the SunOS command, ls -l (see ls(1)). Bad output filename filename, or no write permission The output file you specified is either invalid, or you do not have write permission for that file or the directory that contains it. Check also that the drive or diskette is not write-protected. Error while writing to temporary file An error occurred while converting your file, possibly because there is not enough space on the current drive. Check the amount of space on the current drive using the DIR command. Also be certain that the default diskette or drive is write-enabled (not write-pro- tected). Notice that when this error occurs, the original file remains intact. Translated temporary file name = filename. Could not rename temporary file to filename. The program could not perform the final step in converting your file. Your converted file is stored under the name indicated on the second line of this message. SunOS 5.10 14 Sep 2000 dos2unix(1)
All times are GMT -4. The time now is 08:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy