Solved

Unix Shell Script Questions

Posted on 2007-04-07
4
5,569 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now