05-17-2018
I can state categorically that if the following are true:
- there is one and only one file that matches the shell pathname matching pattern /u/[Mm]yfolder/scripts/test.sh,
- the pathname that matches that pattern is a regular file,
- the permissions on the pathname that matches that pattern allows execution by the person entering the following command, and
- the command /u/[Mm]yfolder/scripts/test.sh argument1 is typed into a bash or ksh interactive shell at a shell prompt; is entered as a simple command in a valid, non-interactive bash or ksh shell script; and all of the commands in that script are valid on all systems on which you are running that script
then the command will work on both a Solaris system and on a Linux system. If any of the above conditions are not met, there is no way that we can guess at which of the above conditions is causing your attempts to fail with what you have shown us.
Likely problems would include specifying Linux specific options to one or more commands in the script the you are executing that are not valid on your Solaris system, that you have specified a path in the script that you are executing that is valid on your Linux system but is not valid on your Solaris system, or giving that pathname matching pattern to something other than a shell that uses Bourne shell syntax.
With all of the details that you have hidden from us, there is no way for us to tell you what you need to do to fix your problem.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can convert a Lower case variable value to an upper case in the kron shell script. (3 Replies)
Discussion started by: dchalavadi
3 Replies
2. Shell Programming and Scripting
Hi, I have a variable $Ctrcd which contains country names in upper case and i want to convert them into lower case. I have tried so many solutions from already existing threads but couldn't get the correct one.
Can anybody help me with this.....
Thanks a lot.. (2 Replies)
Discussion started by: manmeet
2 Replies
3. Shell Programming and Scripting
I have a package to install and the installation script which does it . The files/directories names in the script are all lower case but the actual package has everything in upper case - file names, directories . I don't want to rename directories and files in the package - it has a lot of them . ... (2 Replies)
Discussion started by: vz6zz8
2 Replies
4. Shell Programming and Scripting
Hi All
I have a script which extracts values from a Database (A persons name) and puts it into a variable in my script IE: $NAME
However the Value in the DB is all in uppercase and contains the users first name and last name
EG:
> echo $NAME
GRAHAM BOYLE
>
What I need is only the... (7 Replies)
Discussion started by: grahambo2005
7 Replies
5. Shell Programming and Scripting
Hi all,
i have a data array as followes.
ARRAY=DFSG345GGG
ARRAY=234FDFG090
ARRAY=VDFVGBGHH
so on..........
i need all english letters to be change to lower case. So i am expecting to see
ARRAY=dfsg345ggg
ARRAY=234fdfg090
ARRAY=vdfvgbghh
so on........
If i have to copy this data in... (8 Replies)
Discussion started by: usustarr
8 Replies
6. Shell Programming and Scripting
Is there a command that can switch a character variable from UPPER case to lower case?
like
foreach AC ( ABC BCD PLL QIO)
set ac `COMMAND($AC)`
...
end
Thanks a lot! (3 Replies)
Discussion started by: rockytodd
3 Replies
7. Shell Programming and Scripting
Hello Unix Gurus :
It would be really appreciative if can find a solution for this .
I have records in a file .
I need to Capitalize the records based on condition .
For Example i tried the following Command
COMMAND -->
fgrep "2000YUYU" /export/home/oracle/TST/data.dat | tr '' ''... (12 Replies)
Discussion started by: tsbiju
12 Replies
8. Shell Programming and Scripting
here is a code
column_name="vivek"
column_name2="ViVeK"
column_name=$(echo $column_name | awk '{print tolower($0)}')
column_name2=$(echo $column_name2 | awk '{print tolower($0)}')
echo "column name 1 lower: $column_name"
echo "column name... (6 Replies)
Discussion started by: vivek d r
6 Replies
9. UNIX for Dummies Questions & Answers
There is a script where we pass the parameter in lower case:
say: . ./scriptName pArameter
#!/bin/ksh
echo "`date` Entering $0 Reloading the $1 table "
mname1=$1
(code to login MYSQL Database)
Truncate table $mname1;
exit
!
Since now there is a limitaion of MYSQL that it accept... (5 Replies)
Discussion started by: ambarginni
5 Replies
10. Shell Programming and Scripting
Hi all,
I am trying to find a way to change first letter in a word from lower case to upper case. It should be done for each first word in text or in paragraph, and also for each word after punctuation like
. ; : ! ?I found the following command
sed -i 's/\s*./\U&\E/g' $@ filenamebut... (7 Replies)
Discussion started by: georgi58
7 Replies
LEARN ABOUT SUNOS
run-parts
RUN-PARTS(8) System Manager's Manual RUN-PARTS(8)
NAME
run-parts - run scripts or programs in a directory
SYNOPSIS
run-parts [--test] [--verbose] [--report] [--lsbsysinit] [--regex=RE] [--umask=umask] [--arg=argument] [--exit-on-error] [--help] [--ver-
sion] [--list] [--reverse] [--] DIRECTORY
run-parts -V
DESCRIPTION
run-parts runs all the executable files named within constraints described below, found in directory directory. Other files and directo-
ries are silently ignored.
If neither the --lsbsysinit option nor the --regex option is given then the names must consist entirely of ASCII upper- and lower-case let-
ters, ASCII digits, ASCII underscores, and ASCII minus-hyphens.
If the --lsbsysinit option is given, then the names must not end in .dpkg-old or .dpkg-dist or .dpkg-new or .dpkg-tmp, and must belong to
one or more of the following namespaces: the LANANA-assigned namespace (^[a-z0-9]+$); the LSB hierarchical and reserved namespaces
(^_?([a-z0-9_.]+-)+[a-z0-9]+$); and the Debian cron script namespace (^[a-zA-Z0-9_-]+$).
If the --regex option is given, the names must match the custom extended regular expression specified as that option's argument.
Files are run in the lexical sort order (according to the C/POSIX locale character collation rules) of their names unless the --reverse
option is given, in which case they are run in the opposite order.
OPTIONS
--test print the names of the scripts which would be run, but don't actually run them.
--list print the names of the all matching files (not limited to executables), but don't actually run them. This option cannot be used with
--test.
-v, --verbose
print the name of each script to stderr before running.
--report
similar to --verbose, but only prints the name of scripts which produce output. The script's name is printed to whichever of stdout
or stderr the script first produces output on.
--reverse
reverse the scripts' execution order.
--exit-on-error
exit as soon as a script returns with a non-zero exit code.
--lsbsysinit
use LSB namespaces instead of classical behavior.
--new-session
run each script in a separate process session. If you use this option, killing run-parts will not kill the currently running
script, it will run until completion.
--regex=RE
validate filenames against custom extended regular expression RE. See the EXAMPLES section for an example.
-u, --umask=umask
sets the umask to umask before running the scripts. umask should be specified in octal. By default the umask is set to 022.
-a, --arg=argument
pass argument to the scripts. Use --arg once for each argument you want passed.
-- specifies that this is the end of the options. Any filename after -- will be not be interpreted as an option even if it starts with
a hyphen.
-h, --help
display usage information and exit.
-V, --version
display version and copyright and exit.
EXAMPLES
Print the names of all files in /etc that start with `p' and end with `d':
run-parts --list --regex '^p.*d$' /etc
COPYRIGHT
Copyright (C) 1994 Ian Jackson.
Copyright (C) 1996 Jeff Noxon.
Copyright (C) 1996, 1997, 1998 Guy Maor
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Clint Adams
run-parts is free software; see the GNU General Public License version 2 or later for copying conditions. There is no warranty.
Debian 27 Jun 2012 RUN-PARTS(8)