07-24-2009
Linux script - Crazy results
Here is my script:
#
# Capture the current directory.
export -p CurrentDir="`pwd`"
echo $CurrentDir
#
# Capture the new directory name in the form YYYYMMDD.
export -p DateDir="`date +"%Y%m%d"`"
echo $DateDir
#
# Store the desired target directory.
export -p TargetDir="/staging/VCproc/TestIncoming"
echo $TargetDir
#
# Create the directory to move yesterday's file to.
cd $TargetDir
#mkdir $DateDir
#
#
cd $CurrentDir
Here are the (unwanted) results:
>. exec_move_yesterday_files_from_incoming.sh
/staging/VCproc/application/dm
20090724
/staging/VCproc/TestIncoming
: No such file or directoryTestIncoming
: No such file or directoryapplication/dm
What am I doing wrong? Thanks in advance.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi
Could be stupid, but I can figure out... I have a script that downloads a file from a http server ( virus definitions file ). The thing is that when I run it from the console (bash) works fine, but when I put it in the root's cron it doesn't, and it generates a core file.
example:
... (8 Replies)
Discussion started by: piltrafa
8 Replies
2. Linux
My system bench mark results
INDEX VALUES
TEST BASELINE RESULT INDEX
Arithmetic Test (type = double) 2541.7 876123.7 344.7
Dhrystone 2 without register variables 22366.3 5411602.3 ... (1 Reply)
Discussion started by: chandra s
1 Replies
3. Linux Benchmarks
Hi,
I was trying to build Linux Benchmarks with latest Intel C++ Compiler.
When I used -ipo (inter-procedural optimization) option, arithmetic test (arith.c) failed on execution.
The problem is Intel compiler's advanced optimization option (-ipo) optimizes much more than expected and this... (50 Replies)
Discussion started by: cpjain
50 Replies
4. Shell Programming and Scripting
I'm using a PERL cgi script that uses rrdtool to make graphs. I can't get the syntax correct to use a degree sign (alt+0176 like this °) and also using a variable.
If I use single quotes, I can't call the variable. If I use double quotes, there is an extra symbol (Â) before the ° which goes... (2 Replies)
Discussion started by: audiophile
2 Replies
5. Red Hat
I seem to be somewhat baffled by the results of the -L option of the ls command on our new Linux system.
I have a symbolic link defined like the following:
ptmawpmfld.sqr as /u21/xxxx/m/moranp1/yyyy/fixpaths/tests20091218/awpmfld.sqr
When I issue the command ls -l ptmawpmfld.sqr, I see the... (2 Replies)
Discussion started by: ptmoran
2 Replies
6. Shell Programming and Scripting
hello everyone,
i really need your help to write a script which would just print following kind of result into a text file (result.txt)
XYZ test Results
ID: <unique-id> Date: <date>
-------------------------------------------------
| Task | Result | Time |... (3 Replies)
Discussion started by: viriimind
3 Replies
7. UNIX for Dummies Questions & Answers
Hello there,
first of all: I do not want to become a hacker. you cannot do that. you cannot learn that from a book.
Don't think I'm some kind of a script-kiddie.
now that's settled let's start.
I've been trying around with a lot of OS lately.
I have backtrack5 installed on my notebook,... (10 Replies)
Discussion started by: Dr. Nick
10 Replies
8. UNIX for Dummies Questions & Answers
I am trying to sort a file . The file looks like this:
DDFF 2 /ztpfrepos/pgr/load
DDFQ 2 /ztpfrepos/pgr/load
DDFX 2 /ztpfrepos/pgr/load
DDUA 2 /ztpfrepos/pgr/load
My command:
sort -k1 /home/c153507/Bin/OPL1.txt -o /home/c153507/Bin/OPL1.txt
The results are OK except for one line where... (4 Replies)
Discussion started by: Yahalom
4 Replies
9. Shell Programming and Scripting
Hi,
I am new to linux...
How to Assign SQL Query Results to Variables in Linux,i want ti generate it in param files, Can anyone please explain me.
Ex: SQL> Select * from EMP;
O/P: Emp_No Emp_Name
1 AAA
2 BBB
3 CCC
and I want expected... (5 Replies)
Discussion started by: Sravana Kumar
5 Replies
10. Shell Programming and Scripting
Hello,
I'm trying to create a mechanism wherein a set of Production servers will email me the results of system checks like Uptime, NFS Mounts and a Process after every scheduled reboot.
For this, I figured I'd use the @reboot parameter that crond comes with.
I have added the below onliner... (3 Replies)
Discussion started by: pocodot
3 Replies
LEARN ABOUT V7
asadmin-create-domain
asadmin-create-domain(1AS) User Commands asadmin-create-domain(1AS)
NAME
asadmin-create-domain, create-domain - creates a domain with the given name
SYNOPSIS
create-domain [--domaindir install_dir/domains] [--passwordfile filename] [--terse=false] [--echo=false] [--interactive=false] --adminport
port_number --adminuser admin_user [--adminpassword password] [--instanceport 8080] [--domainproperties (name=value)[:name=value]*]
domain_name
create-domain creates a domain with the specified administration port number, administration user, administration password, and domain
name. By creating a domain, an administration server is created in a directory named as the domain name. This command is supported in local
mode only.
If a user creates a domain in a non-default directory, the domain will not be automatically shutdown during uninstallation.
OPTIONS
--domaindir directory where the domain is to be created. If specified, path must be accessible in the filesystem. If not speci-
fied, the domain is created in the default install_dir/domains directory.
--passwordfile file containing the domain application server password in the following form: AS_ADMIN_PASSWORD=password. Where
password is the actual administrator password for the domain.
--terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well-
formatted data for consumption by a script. Default is false.
--echo setting to true will echo the command line statement on to the standard output. Default is false.
--interactive if set to true (default), only the required options are prompted.
--adminport port number of the domain application server listening for the administration requests.
--adminuser administrative username for the specified domain.
--adminpassword password to administer the domain application server.
--instanceport port number of the http listener. The port number cannot be currently in use.
--domainproperties list of the property name/value pairs for the domain to be created separated by the ":" character. The property
value assignment character is =. Valid property names are: jms.port, orb.listener.port, http.ssl.port,
orb.ssl.port, orb.mutualauth.port. Valid values are: http.ssl.port=1043:orb.ssl.port=1060:orb.mutu-
alauth.port=1061:jms.port=7676.
OPERANDS
domain_name name of the domain. Must be a unique name.
Example 1: Using create-domain
asadmin> create-domain --domaindir /export/domains
--adminport 7070 --adminuser admin --adminpassword adminadmin
--instanceport 7071 sampleDomain
created domain sampleDomain successfully
Where: the sampleDomain domain is created in the /export/domains directory.
EXIT STATUS
0 command executed successfully
1 error in executing the command
asadmin-delete-domain(1AS), asadmin-start-domain(1AS), asadmin-stop-domain(1AS), , asadmin-list-domains(1AS)
J2EE 1.4 SDK March 2004 asadmin-create-domain(1AS)