korn syntax


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting korn syntax
# 1  
Old 09-26-2004
korn syntax

Hi, how do I write this condition in korn shell:

file="*.html"
if [ -f *.html && file created today ]
then
echo "$file"
fi

I am trying to find all html files from a input text file that were created today and ftp them to a different server. please help.
# 2  
Old 09-27-2004
Try this.. may be elementary, but it should work unless I overlooked something.

Code:
file="*.html"

date | cut -d" " -f2-3 | read var1
ls -l file | awk '{print $6,$7}' | read var2

if [[ -f *.html && "$var1" = "$var2" ]]
then
echo "$file"
fi

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

New to korn shell

I am new to korn shell and slowly learning. Is there a way to have a parent script prompt for input and then execute a child script and return the output then move forward and ask for more input and then execute the next child script? I think the answer is no but thought i would ask. (2 Replies)
Discussion started by: cptkirkh
2 Replies

2. Shell Programming and Scripting

help with korn script

Hi guys, I am new to unix scripting. I have a folder rx and it has subfolders rx1,rx2 and rx3 each subfolder has 4 directories each load,land,arch and extr I have the below tar and rm commands using wich we should write a shell script rx1-- tar -cf... (2 Replies)
Discussion started by: Kornscript
2 Replies

3. Shell Programming and Scripting

korn shell

I am using korn shell but I want to have my prompt to represnent that of my C shell because I like it better. Is there anyway to do this? (1 Reply)
Discussion started by: vthokiefan
1 Replies

4. UNIX for Dummies Questions & Answers

Korn vs. Bash - which to use

Hello: I'm a newbie to Unix/Linus and shell scripting. This is probably a stupid question but here goes. Some people at work use Korn for scripting while others use Bash. What is the difference between the two? If the two is better to use? When a person logs in, one will type... (9 Replies)
Discussion started by: hbradshaw
9 Replies

5. Shell Programming and Scripting

Korn Shell and Oracle

Hi Guys, I haven't worked on oracle much but I have a situation where I have to do bdf in all the servers and insert that information into oracle table. I have already created table which have 7 columns, I can insert manually but I dont know how to insert that using Korn shell. SERVER_ID ... (9 Replies)
Discussion started by: pareshan
9 Replies

6. Shell Programming and Scripting

help with Korn script

Hello All.. Can someone tell me how to use "backspace" key in a script. I tried to use ^C (type from the keyboard) but its not working. I know its a silly question to ask but I am really frustated with this thing for good 1 hour or so. I am trying to provide an input file to a script so that I do... (3 Replies)
Discussion started by: solaix14
3 Replies

7. Shell Programming and Scripting

how to make syntax into a korn script??

ok i have this script called script.nawk: BEGIN {print "List\n"} BEGIN {print "AL"} BEGIN {print "AM"} /EAST/ {print $3, $2} END {print "End of Report"} How would I change this so that I don't have to type nawk -f script.nawk filename? Instead just run it as a korn script? thanks! (18 Replies)
Discussion started by: llsmr777
18 Replies

8. What is on Your Mind?

Windows and the Korn shell

I just found this story about how microsoft tried to integrate Unix like shell scripting in NT. It dates back 1997 but it is still funny: And David Korn version of it: http://slashdot.org/articles/01/02/06/2030205.shtml (0 Replies)
Discussion started by: ripat
0 Replies

9. Shell Programming and Scripting

Korn Shell

Hi I am new to shell programming. I need help to write a script to monitor a process on Sun OS. If the process fails then call a oracle procedure. i check the process if running by typing ps -ef | grep ESP | grep -v grep root 29002 1 0 Mar 18 ? 7:20... (4 Replies)
Discussion started by: gpanesar
4 Replies

10. UNIX for Dummies Questions & Answers

Korn vs Bash

Let's say I have alias good_op=`]` in a Korn shell script. How can I write that in a non-interactive bash shell? (5 Replies)
Discussion started by: jpprial
5 Replies
Login or Register to Ask a Question