Solved

Unix Shell Script Questions

Posted on 2007-04-07
4
5,578 Views
Last Modified: 2008-01-09
Hi,

I am going to attend an interview for a programmer position. The questions will be based on Perl and Shell Script.
Can anyone please post Shell Script questions which usually ask for programmer position?

Thanks
Jithu
0
Comment
Question by:jithu091900
  • 2
4 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 18870271
"How would you write a script that substitutes underscores for blanks in all the filenames in a directory?"
0
 
LVL 84

Assisted Solution

by:ozo
ozo earned 25 total points
ID: 18870314
What languages do you know?
What scripts have you written?
Here's a shell script, please add comments explaining it.
Here's a broken shell script, what would you do to try to fix it?
Here's a (incomplete) specification for a script, how would you implement it? (waiting to see what questions you ask)
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 18876598
please explain the results and impacts for various different shells and perl of following 2 commands:

true || false && echo bang
false || true && echo bang
0
 
LVL 1

Accepted Solution

by:
sureshp earned 100 total points
ID: 19016943
what is the purpose of echo command
what is the difference between find and grep command
How will you append into a file
How do you take a single line of input from the user in a shell script?
Write a script to convert all DOS style backslashes to UNIX style slashes in a list of files.
Write a regular expression (or sed script) to replace all occurrences of the letter ‘f’, followed by any number of characters, followed by the letter ‘a’, followed by one or more numeric characters, followed by the letter ‘n’, and replace what’s found with the string “UNIX”.
Write a program in any language you choose, to reverse a file.
What is the purpose of export command
If you have a string "one two three", which shell command would you use to extract the strings

0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Powershell Script 8 66
Using Powershell to monitor file changes then execute a command 5 265
Powershell script explanation 10 58
powershell code to list items in dropdown 6 64
Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
Utilizing an array to gracefully append to a list of EmailAddresses
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question