1st time with scripts


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers 1st time with scripts
# 1  
Old 10-26-2011
1st time with scripts

Hello everyone. I am new to writing scripts and I am trying to figure out how to get it to work on a unix system. I am currently using windows xp to write my scripts. My questions are:
1. If the scripts are writtin in Wordpad, what do I save them as before converting them on unix?

2. After ftp'ing the weekday.scr I have to unix using this line :
" dos2unix Weekday.scr Weekdayunix.scr"
I get the problem:
"problems converting"
So is there something Im doing wrong?

Thanks guys. If you need any other information, i will gladly supply it. I just wanna figure this stuff out so I am more comfortable with unix. Thanks again!
# 2  
Old 10-27-2011
Notepad is be a better choice than Wordpad. I remember Wordpad saves the file as RTF by default. You need to manually change the file type to .txt when saving.

Shell script usually uses ".sh" suffix. ".scr" would easily mix up with screen saver files in Windows.

"dos2unix" directly convert the files in the argument. You don't need to specify the output file.
# 3  
Old 10-27-2011
This does not look like homework to me, but for some reason you chose to post in this sub forum. For this sub forum and generally homework or classrom task, the rule down there applies (for your future posts!). Though I let the thread open and move it to another sub forum.

Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
# 4  
Old 10-28-2011
Another option alternative to dos2unix is using texpad instead of notepad, where you can save in unix format. But when migrating files from windows is always a good procedure to do dos2unix.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to run 2 python scripts at the same time side by side on the same line?

Could I run 2 python scripts at the same time side by side output on the same line in this same format but with scripts? from itertools import izip_longest with open("file1") as textfile1, open("file2") as textfile2: for x, y in izip_longest(textfile1, textfile2, fillvalue=""): x =... (4 Replies)
Discussion started by: bigvito19
4 Replies

2. UNIX for Dummies Questions & Answers

1st time awk user strings not matching right....

So I was given a file,and I want to count how many occurrences happen with a specific string. I have two, that could have up to 3 different outcomes. Now my trouble I believe starts with this string, "news.cais.net" but why? as of now my output is this... accepted rejected ... (3 Replies)
Discussion started by: squidGreen
3 Replies

3. Shell Programming and Scripting

Running Multiple scripts at a time

Hello! I have a scriptA.ksh and in this script I need to call script1.ksh, script2.ksh, script3.ksh, script4.ksh and script5.ksh. But want to run in two batches like 1st script1.ksh, script2.ksh, script3.ksh, once all 3 are completed then script4.ksh script5.ksh I have given the syntax... (1 Reply)
Discussion started by: karumudi7
1 Replies

4. Homework & Coursework Questions

1st yr Exam revision thread - Scripts, C, Commands

Hello, I have an exam for 1st year Linux and Unix programming coming up in a week and I need some help going over the past exams, I want to make sure I'm getting the right answers in the past exams to ensure full marks. The internet is a distraction so making this thread will hopefully help me... (3 Replies)
Discussion started by: murphy
3 Replies

5. Shell Programming and Scripting

Using same variable in 2 different scripts that run at the same time

Hi, I have two scripts that use the same variable. Say suppose I export that variable in script 1 and try to use it in script 2 where I have declared it locally, what will be the effective value of the variable? Will it take the exported value or the locally declared? example: Script1... (4 Replies)
Discussion started by: PraveenSikamani
4 Replies

6. UNIX for Dummies Questions & Answers

Shell Scripts - Append a filename with date and time....

Hello, I need to create a shell script that appends a filename to create a name with the date and time appended that is guaranteed to not exist. That is, the script insures you will not overwrite a file with the same name. I am lost with this one. I know I need to use date but after that I am... (3 Replies)
Discussion started by: citizencro
3 Replies

7. UNIX for Dummies Questions & Answers

Shell Scripts - shows today’s date and time in a better format than ‘date’ (Uses positional paramete

Hello, I am trying to show today's date and time in a better format than ‘date' (Using positional parameters). I found a command mktime and am wondering if this is the best command to use or will this also show me the time elapse since 1/30/70? Any help would be greatly appreciated, Thanks... (3 Replies)
Discussion started by: citizencro
3 Replies

8. Shell Programming and Scripting

Time based Processing of the Scripts

Any one can tell me how can i execute the processes for every 10 min.Actually iam having 3 Processes for every 10 min i want to run these 3 Process,one process at every 10 min. If any of the process is busy i just want to execute the free one. first 10 min execute P1 next 10 min execute P2... (3 Replies)
Discussion started by: krk_555
3 Replies

9. Shell Programming and Scripting

Determine date and time the file was created through shell scripts

Can I determine when the particular file was created, in korn-shell. Can please someone help me. If possible please mail the solution to me. my mail id: bharat.surana@gmail.com (1 Reply)
Discussion started by: BharatSurana
1 Replies

10. HP-UX

Scripts for monitoring real time for the error code

Hi ! I wish extract one information(error code) from the machine which is running on the HP-UX platform. Can anyone help me? Wanted to write a scripts that monitor real time at the error code and transfer the information out from the machine. The information is then process and SMS out to the... (9 Replies)
Discussion started by: JOHNSON
9 Replies
Login or Register to Ask a Question