Unable to source file in my script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Unable to source file in my script
# 8  
Old 11-30-2016
By editing your file in Microsoft Notepad you have inserted carriage return characters which will not be seen in terminal but will be taken as literal parts of filenames, etc by the shell.

The actual error was most likely "can't find myfile.sh\r" or the like.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script Comment code blocks in a bash source file

Just began to learn on Shell Script. I got an exercise from my friend. I know how to make this happen in C, but I'm not familiar with Shell Script. Hope I can get some help from all of you. I want to write a bash script to comment code blocks in a bash source file. What I mean comment is '#', I... (1 Reply)
Discussion started by: HiFuture0801
1 Replies

2. HP-UX

Unable to edit the sudoers file using script

Hi All, I've made a script in order to delete the users. The script is deleting the users and removing its entry from the /etc/sudoers however it is changing the permissions of the /etc/sudoers file to the user from which it is executing the script. #!/bin/ksh #set -x print "The script... (2 Replies)
Discussion started by: Kits
2 Replies

3. Shell Programming and Scripting

Script to insert a function into a C source file

Hello, I think I need sed, but perhaps awk could help. I am trying to add a function to a C source file based off a struct declaration. for example: struct Rational { int numerator; int denominator; }; becomes struct Rational (4 Replies)
Discussion started by: afulldevnull
4 Replies

4. Shell Programming and Scripting

ksh script to create a generic csv file from different source formats

Hi all, I have a requirement to create a "superset" file out of a number of different sources with some different and some same columns. We intend to have a manually updateable SuperSetCols.csv which would look like "ColA","ColB","ColC","ColD","ColE","ColF","ColG" so someday we may add... (3 Replies)
Discussion started by: Leedor
3 Replies

5. UNIX for Advanced & Expert Users

Automated SCP script passing password to preserve source file timestamp

Hi My requirement is i want to copy files from remote server to the local server and also i need to preserve the timestamp of the remote file. By using scp -p , it is working fine in the interactive call but it is not preserving he file timestamp when i use it in the non interactive scp call... (1 Reply)
Discussion started by: skumar75
1 Replies

6. Shell Programming and Scripting

Rsync help - unable to delete the Source file

Hi All, I am facing problem deleting Source while using the rsync command. rsync --include=*`date --date="-1 day" \+\%Y\%m\%d`* --include=*`date +\%Y\%m\%d`* --exclude=* --delete-after -auvb -e ssh USER@SERVER:SOURCE DESTINATION However the sync happens but not the deletion of the source... (1 Reply)
Discussion started by: amitkhiare
1 Replies

7. Shell Programming and Scripting

Different behaviour when running script as source file

Hi all, OS: Solaris 10 I've written a script to scan the oratab file and give me a list of Oracle SIDs to choose from, and obviously in order to set the ORACLE_SID environment variable from within a script for the current shell, the script must be run as a source file. When I run it as a... (1 Reply)
Discussion started by: longjon
1 Replies

8. Shell Programming and Scripting

source a property file in script give error

I have sourced a property file in my script like this to load some variables in the script Then i am able to echo all the property file values inside script but the script is not able to recognize other unix commands #!/bin/bash . build.properties mkdir build i am getting error ... (3 Replies)
Discussion started by: codeman007
3 Replies

9. Shell Programming and Scripting

Source Env file in the Shell Script

Hi I am having a script which sets the application environment. In this script i am sourcing the applications env file, when i am debugging the script i see its executing all the environment values and all the variable values are set properply. Once this main shell script executes, then... (4 Replies)
Discussion started by: umakanthly
4 Replies

10. Shell Programming and Scripting

Tidy shell script source file

Hi all, Is there a tool to tidy up shell script source file and reformat it. Preferably I am looking for a perfect tool to do this. Also I have heard it is possible to do with emacs editor but unfortunately it is looking very different and new from vi. Emacs is new to me and I could not find... (1 Reply)
Discussion started by: meharo
1 Replies
Login or Register to Ask a Question
Data::FormValidator::ConstraintsFactory(3pm)		User Contributed Perl Documentation	      Data::FormValidator::ConstraintsFactory(3pm)

NAME
Data::FormValidator::ConstraintsFactory - Module to create constraints for HTML::FormValidator. DESCRIPTION
This module contains functions to help generate complex constraints. If you are writing new code, take a look at Data::FormValidator::Constraints::MethodsFactory instead. It's a modern alternative to what's here, offering improved names and syntax. SYNOPSIS
use Data::FormValidator::ConstraintsFactory qw( :set :bool ); constraints => { param1 => make_or_constraint( make_num_set_constraint( -1, ( 1 .. 10 ) ), make_set_constraint( 1, ( 20 .. 30 ) ), ), province => make_word_set_constraint( 1, "AB QC ON TN NU" ), bid => make_range_constraint( 1, 1, 10 ), } BOOLEAN CONSTRAINTS
Those constraints are available by using the ":bool" tag. make_not_constraint( $c1 ) This will create a constraint that will return the negation of the result of constraint $c1. make_or_constraint( @constraints ) This will create a constraint that will return the result of the first constraint that return an non false result. make_and_constraint( @constraints ) This will create a constraint that will return the result of the first constraint that return an non false result only if all constraints returns a non-false results. SET CONSTRAINTS
Those constraints are available by using the ":set" tag. make_set_constraint( $res, @elements ) This will create a constraint that will return $res if the value is one of the @elements set, or the negation of $res otherwise. The "eq" operator is used for comparison. make_num_set_constraint( $res, @elements ) This will create a constraint that will return $res if the value is one of the @elements set, or the negation of $res otherwise. The "==" operator is used for comparison. make_word_set_constraint( $res, $set ) This will create a constraint that will return $res if the value is a word in $set, or the negation of $res otherwise. make_cmp_set_constraint( $res, $cmp, @elements ) This will create a constraint that will return $res if the value is one of the @elements set, or the negation of $res otherwise. $cmp is a function which takes two argument and should return true or false depending if the two elements are equal. NUMERICAL LOGICAL CONSTRAINTS
Those constraints are available by using the ":num" tag. make_clamp_constraint( $res, $low, $high ) This will create a constraint that will return $res if the value is between $low and $high bounds included or its negation otherwise. make_lt_constraint( $res, $bound ) This will create a constraint that will return $res if the value is lower than $bound, or the negation of $res otherwise. make_le_constraint( $res, $bound ) This will create a constraint that will return $res if the value is lower or equal than $bound, or the negation of $res otherwise. make_gt_constraint( $res, $bound ) This will create a constraint that will return $res if the value is greater than $bound, or the negation of $res otherwise. make_ge_constraint( $res, $bound ) This will create a constraint that will return $res if the value is greater or equal than $bound, or the negation of $res otherwise. OTHER CONSTRAINTS
make_length_constraint($max_length) This will create a constraint that will return true if the value has a length of less than or equal to $max_length SEE ALSO
Data::FormValidator(3) AUTHOR
Author: Francis J. Lacoste <francis.lacoste@iNsu.COM> Maintainer: Mark Stosberg <mark@summersault.com> COPYRIGHT
Copyright (c) 2000 iNsu Innovations Inc. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms as perl itself. perl v5.14.2 2011-11-25 Data::FormValidator::ConstraintsFactory(3pm)