Sponsored Content
Full Discussion: Shell Programming
Top Forums Shell Programming and Scripting Shell Programming Post 302964962 by RudiC on Thursday 21st of January 2016 12:30:16 PM
Old 01-21-2016
Please use code tags as required by forum rules!

Not clear. Your snippet loops through the entire command file once for EACH service entry. Regardless of the service's existence in file1. Which might become lengthy.

Please be way more detailed and specific - what exactly do you want to achieve? What's the relation between services and commands? Do you know about the -f option to grep?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Shell Programming

I have a fix_table.ksh script that takes a TABLENAME and a date. So, in jk_table_file.txt I have the tables...one per line, and in jk_out_file.txt I have the date in the format I need. The following doesn not 'want' to work in a shell script... for TABLE in `cat jk_table_file.txt`; do ... (2 Replies)
Discussion started by: JWK1
2 Replies

2. UNIX for Dummies Questions & Answers

Shell Programming Help

Hi, I am new to shell programming, and hve been given a request to write a shell script. Is there any good places to go to see examples of how to write shell programming scripts? Thanks (4 Replies)
Discussion started by: mec585858
4 Replies

3. Shell Programming and Scripting

Shell Programming?

For what purposes should we use shell /what are the tasks we can achieve using shell which is best book to learn shell programming and will nayone tell me diff between shell programming aand shell scripting? Thank u in advance. (1 Reply)
Discussion started by: shrikrishna
1 Replies

4. Shell Programming and Scripting

shell programming

I want notes for learning Shell programming (2 Replies)
Discussion started by: Neha Agarwal
2 Replies

5. Shell Programming and Scripting

{} in shell programming

Could someone please tell me what {} mean when they surround a variable? For instance, $FILE = 'basename $1' //what is passed into this script $BANK = 'dirname $1' $INFILE = ${FILE}.${BANK}.$$ What does $INFILE contain after this assignment? Please let me know Thanks G (4 Replies)
Discussion started by: vgirijanaidu
4 Replies

6. Shell Programming and Scripting

Shell programming

Hi, Iam new to shell program, I want to check a file which is having same lines 2 times and i want to display it in a seperate file. File format is : AQWERTYU|1234567890 ASDFGHJK|0987654321 ZXCVBNML|1098576453 AQWERTYU|1234567890 I need to take the 1st and 4th lines in the above... (5 Replies)
Discussion started by: nivas
5 Replies

7. Shell Programming and Scripting

shell programming

Hi iam new to shell programming. I would like to ask one dought abt the file handling in unix. Iam having a file1 as follows: ASDERFCX1234567890123456 POIUYTRE0098765432123456 BVCXCVBN0955644411111111 File2 ASDERFCX1234567890123456 kill@abc.com ... (8 Replies)
Discussion started by: nivas
8 Replies

8. Shell Programming and Scripting

SHELL PROGRAMMING

Using shell scripting, implement ‘scan.sh' that scans the file system recursively starting from current working directory and generates the file ‘index.txt' that contains a line for each file (or directory) with following fields in tab separated format: 1. The full path of the directory... (1 Reply)
Discussion started by: kranthikiran
1 Replies

9. Shell Programming and Scripting

Shell programming

Hi every one,i am new to unix.Can any one tell me about shell programming.. (1 Reply)
Discussion started by: martina100011
1 Replies

10. UNIX for Dummies Questions & Answers

Shell script to read lines in a text file and filter user data Shell Programming and Scripting

sxsaaas (3 Replies)
Discussion started by: VikrantD
3 Replies
services(4)							   File Formats 						       services(4)

NAME
services - Internet services and aliases SYNOPSIS
/etc/inet/services /etc/services DESCRIPTION
The services file is a local source of information regarding each service available through the Internet. The services file can be used in conjunction with or instead of other services sources, including the NIS maps "services.byname" and the NIS+ table "services." Programs use the getservbyname(3SOCKET) routines to access this information. The services file contains an entry for each service. Each entry has the form: service-name port/protocol aliases service-name This is the official Internet service name. port/protocol This field is composed of the port number and protocol through which the service is provided, for instance, 512/tcp. aliases This is a list of alternate names by which the service might be requested. Fields can be separated by any number of SPACE and/or TAB characters. A number sign (#) indicates the beginning of a comment; any charac- ters that follow the comment character up to the end of the line are not interpreted by routines which search the file. Service names may contain any printable character other than a field delimiter, a NEWLINE, or a comment character. Any changes to a port assignment do not affect the actual port registration of the service. FILES
/etc/nsswitch.conf configuration file for name-service switch SEE ALSO
getservbyname(3SOCKET), inetd.conf(4), nsswitch.conf(4) NOTES
/etc/inet/services is the official SVR4 name of the services file. The symbolic link /etc/services exists for BSD compatibility. SunOS 5.10 12 Oct 2000 services(4)
All times are GMT -4. The time now is 12:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy