Solved

Unix Shell Script Questions

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Over the years I've spent many an hour playing on hardened, DMZ'd servers, with only a sub-set of the usual GNU toy's to keep me company; frequently I've needed to save and send log or data extracts from these server back to my PC, or to others, and…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

919 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

16 Experts available now in Live!

Get 1:1 Help Now