New User needing Help for upcoming job


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers New User needing Help for upcoming job
# 1  
Old 02-25-2006
Question New User needing Help for upcoming job

Hello All,

I'm applying for a new job in telecommunications and have been asked to learn unix and pearl scripting. I've got a copy of knoppix Linux 03. I at this point only know how to list files, create directories, change permissions. I was instructed to learn how to create files, basic navigation and some basic scripting. I've bought unix for dummies and 1/3 of the way through it now. I don't see anything yet about creating files... which i'm assuming is only done in vi... I would like to accomplish the following:
create a directory called Nortel
create a file called plmn_list
have the file look like this
npa nxx trkgrp carrier
505 440 1 sprint
808 255 3 mci
602 256 2 att
425 444 1 sprint

then the script I would like to write would ask me to enter a npa nxx and based on what I type tell me which carrier it's going through via looking up the table/file I created called plmn_lst.

I would also like a script that asks which carrier I want to look up and it display or output to another file all the npa nxx that are listed for that carrier.

Can anyone help?

Thank you!! Smilie
# 2  
Old 02-25-2006
About creating files... when a file is opened, it will (generally) be created if it does not exist.
Code:
echo hello
echo hello > datafile

The first line will display "hello" on the screen. The second line sends "hello" into a file call datafile. If datafile pre-existed, whatever data used to be in it is lost. And if datafile did not exist, well it does now.
# 3  
Old 02-25-2006
thanks Perderabo, this will help me! As for creating a file like the one I wanted. example would be using excel in windows. is that something done in vi? If so, how do you seperate fields? would I use the pipe? if so what seperates a column heading from the column data? Once again any info is greatly appreciated!
# 4  
Old 02-25-2006
Quote:
Originally Posted by cyberjax21
thanks Perderabo, this will help me! As for creating a file like the one I wanted. example would be using excel in windows. is that something done in vi? If so, how do you seperate fields? would I use the pipe? if so what seperates a column heading from the column data? Once again any info is greatly appreciated!
vi is an editor and it has nothing to do with excel. If you want a spreadsheet program, get one and follow the instructions that come with it. If you want to use vi, then do that. You managed to put the data in your first post without stumbling over separating fields or the header line.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Feedback wanted for upcoming script language

Hi I'm currently rewriting a project from install-required to a pure runtime form. The former had required the project name and the definition of the command as name, as they all become functions now, this could be shorter. As you might have figured, the project already exists in another... (3 Replies)
Discussion started by: sea
3 Replies

2. Shell Programming and Scripting

Cron Job for Fake User

There is a program that we (a company I'm working for) would like to run once per day, and the approach we're taking is to create a fake user to give a location to the data for this program, and to be the user running the program. For the sake of the discussion, let me call the fake user "bob". ... (5 Replies)
Discussion started by: stevendaryl
5 Replies

3. UNIX for Advanced & Expert Users

Change to NIS netgroup definition in upcoming Internet Draft

I'm considering the merits of slightly redefining the "domain" field in a NIS netgroup (the third field in the triple) to make it more useful, in a new Internet Draft that I am currently developing. Does anyone out there who uses NIS actually make use of the "domain" field? The places I've worked... (8 Replies)
Discussion started by: cambridge
8 Replies

4. Shell Programming and Scripting

Does running a cron job of a user require the user to be logged in?

Suppose user 'asdf' is not logged into server 'bbbb', but the server is up. User 'asdf' has cron job. Will it be executed? (1 Reply)
Discussion started by: thulasidharan2k
1 Replies

5. Solaris

Is user cron job running in background?

Hi, Should the user jobs specified in crontab be running in background? Cron daemon is already running in background. So I am not sure whether should the jobs (output and error messages are redirected to file) ran by it be explicitly stated to be run in background (& at end of command) if one... (1 Reply)
Discussion started by: joe_x
1 Replies

6. Shell Programming and Scripting

First public beta of upcoming gawk 4.0 release

Hi (g)awk lovers, just spreading the news: the first beta is available and there are many new features. This is the original announce. (3 Replies)
Discussion started by: radoulov
3 Replies

7. AIX

user unable to run at job

Aix version is 5.2. users are not able to run only at jobs. users are listed in at.allow file. Getting following Errors: at -l at: 0481-108 You are not authorized to use the at command. atq 0481-067 Cannot change to the /var/spool/cron/atjobs directory. at 24:10:00 pwd at:... (5 Replies)
Discussion started by: bpsunadm
5 Replies
Login or Register to Ask a Question