Script syntax...does this work?

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Script syntax...does this work?
# 1  
Old 11-23-2007
Script syntax...does this work?

Hi all, I'm just a basic unix scripto...does the following lines work??

I saw this lines from a script I was about to modify, please take note that these are not the original directories and the sign ( " ) is in there.

"/destination/directory" "/origin/directory"

If I add a command line in the "destination/directory" will it work even if it has the double quotes sign?

"/destination/directory/`date +%m%d%y`" "/origin/directory"

Please take note that the "/destination/directory" is the current server I'm at, while the "/origin/directory" is a remote server from someplace else and we use FTP for transfer.

Thanks thanks. Smilie
# 2  
Old 11-25-2007
Should be fine, double quotes don't escape backticks
# 3  
Old 11-26-2007
Originally Posted by Smiling Dragon
Should be fine, double quotes don't escape backticks
Thanks for the reply, Smilie
# 4  
Old 11-26-2007
Incidentally, I prefer using `date +%y%m%d` when embedding dates in filenames, as the resultant files are listed in time order when you do an "ls".
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Syntax error on script

Evening All (or morning for some), Could anyone have a look at the below and advise where i've going wrong with the syntax as i keep getting the below error while trying to run. Any help would be really apprecaited. ./testout: line 13: syntax error near unexpected token `else' ... (4 Replies)
Discussion started by: mutley2202
4 Replies

2. Shell Programming and Scripting

Script syntax help

#!/bin/bash if ; then echo "Lipsa IP"; exit; fi i=1 ip=$1 while ; do if ; then rand=`head -$i pass_file | tail -1` user=`echo $rand | awk '{print $1}'` pass=`echo $rand | awk '{print $2}'` CMD=`ps -eaf | grep -c mysql` if ; then ./mysql $ip $user $pass & else sleep 15... (6 Replies)
Discussion started by: galford
6 Replies

3. Shell Programming and Scripting

My script work on Linux but not work in sunos.

My script work on Linux but not work in sun os. my script. logFiles="sentLog1.log sentLog2.log" intial_time="0 0" logLocation="/usr/local/tomcat/logs/" sleepTime=600 failMessage=":: $(tput bold)Log not update$(tput rmso) = " successMessage="OK" arr=($logFiles)... (7 Replies)
Discussion started by: ooilinlove
7 Replies

4. Shell Programming and Scripting

Syntax error calling TCL script from shell script

hello everyone i am beginner on shell scripting .and i am working on my project work on ad hoc network i wrote a batch (.sh) to do a looping and execute a tcl script i wrote before in each iteration ..but i got this problem " syntax error near unexpected token `('... (1 Reply)
Discussion started by: marcoss90
1 Replies

5. Web Development

How to make "enter" work in HTML syntax

I have one syntax to find something from desktop on server, the script is as below, I actually speaking don't know anything in this script. It creates a window, where i get a drop down boxes with folder names given below and a blank box where i have to put the folder name to search. and then I... (2 Replies)
Discussion started by: patilrakesh1984
2 Replies

6. Shell Programming and Scripting

Script Help - Syntax Issues

I have the last portion of an Open Step ping server shell script that is giving me issues that I need to adapt to Ubuntu 8.10 Client flavor of Unix. Can someone see what is wrong with the following: # if there are servers that just went down or came back up, notify # with high importance if ;... (3 Replies)
Discussion started by: gbxfan
3 Replies

7. Shell Programming and Scripting

syntax error on script

Hello all, I am trying to write a little script to create a file and I keep getting the below error and cant see where my syntax mistake(s) is. please help... the script: FILE="/u/e477059/Unix_Machines/LISTS" for X in `cat ${FILE}/list` do ssh $X "echo $X; cd /var/tmp; ... (2 Replies)
Discussion started by: rookieuxixsa
2 Replies

8. Shell Programming and Scripting

Modify Perl script to work with txt - Permissions script

Hi I have this code, and i want work with a ls -shalR output in .txt What i need read to do this?? Where start? #!/usr/bin/perl # Allrights- A perl tool for making backups of file permissions # Copyright (C) 2005 Norbert Klein <> # This program is free... (1 Reply)
Discussion started by: joangopan
1 Replies

9. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

Howdie everyone... I have a shell script Inside this file, it only has two commands as below: rm -f ../../reportToday/temp/* rm -f ../../report/* My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies

10. Shell Programming and Scripting

syntax error in script !!

./ ./ Syntax error at line 24 : `then' is not expected. ================================= cat #!/bin/sh # # Parameter Settings ORA_LOG, ORA_SCRIPT, DBA_EMAIL_LIST -- (Set in .profile) bdf | sed "s/%/ /g" | sed "/Filesystem/d" |... (13 Replies)
Discussion started by: uuser
13 Replies
Login or Register to Ask a Question