Solved

Unix Shell Script Questions

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
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…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 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