Sponsored Content
Homework and Emergencies Homework & Coursework Questions Creating a .profile, displaying system variables, and creating an alias Post 302788703 by ravisingh on Tuesday 2nd of April 2013 11:13:16 AM
Old 04-02-2013
Quote:
Originally Posted by Jagst3r21
A couple questions:

1. My teacher wants me to print a listing of the profile. Would I just do "touch .profile" and then append (using ">>") the commands to the file, then print it?

2. I am not sure if my alias is correct. Not sure how to find the exact location of the passwd file
I 1st take your 2nd question.

Code:
grep "$LOGNAME" /etc/passwd

Your teacher wants to get your username from the passwd file. LOGNAME variable contains your username.

To take your 1st question. It seems she wants you to print that file. So, use
Code:
pr -t .profile

Also it may happen that she only wants to display the contents of the profile file. So, use
Code:
cat .profile

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Creating alias for directory path

I am trying to create an alias for a frequently used directory path by using alias xyz="/proj/dir_name" and then trying to reach a sub-directoy by using cd xyz/abc but I get an error saying " No such file or directory " plz tell me wats wrong with this ... (3 Replies)
Discussion started by: jasjot31
3 Replies

2. OS X (Apple)

creating a new profile from command line

Does any1 know how to preform such an operation on a mac? any help appreciated (2 Replies)
Discussion started by: cleansing_flame
2 Replies

3. AIX

To see vhost on VIOS after creating an HMC profile

I created a profile in HMC for a new LPAR and activated it but not yet installed AIX. Is there a step to make this new LPAR available as vhostX from the VIO server after creating and activating an HMC profile? I already shared the CD-ROM device from the HMC profile. Thanks. -... (1 Reply)
Discussion started by: learner1
1 Replies

4. Solaris

Creating Alias for FILE

Hello, I need the command to create alias for a file "FILE" (NOT for commands) ? And Is there any difference between creating alias for files and creating alias for commands ? For info, i'm using Solaris 8 Thx, http://www.unix.com/images/misc/progress.gif (5 Replies)
Discussion started by: newpromo
5 Replies

5. UNIX for Dummies Questions & Answers

Help creating new .profile

Hi, We have a load of users which point to the same basic profile by a link: .profile -> /export/home/dusers/INIT/dot.profile I'd like to create a seperate profile for one user -testu12. If I remove the link from his profile will it delete the actual dot.profile file? I've tried to do a... (4 Replies)
Discussion started by: Grueben
4 Replies

6. Shell Programming and Scripting

problem in creating my own profile file in unix

I am new in shell scripting. currently i am using cygwin. My problem is i created a profile file in my own folder. file name is first.profile in which i gave following values to variable export a=10 now i am executing this profile file by below command ./.first.profile it executed... (4 Replies)
Discussion started by: pratikjain998
4 Replies

7. Shell Programming and Scripting

problem in creating execute profile file in unix

first i created a profile file(my_var.profile) which contains export my_var=20 after that i created shell scripts(my_var.sh) which contains #!/bin/bash . ./my_var.profile echo '$my_var='$my_var but when i am executing sh my_var.sh it is showing error that no such file/directory .profile.... (6 Replies)
Discussion started by: pratikjain998
6 Replies

8. Shell Programming and Scripting

Creating .../ alias in bash

I want to create an alias as follows but is not working alias ../='cd ../' (3 Replies)
Discussion started by: kristinu
3 Replies

9. UNIX for Dummies Questions & Answers

Help on creating and saving an alias

Hello, I want to create an alias for this command: grep -i "<keyword_to_search>" <path_to_search> Here's the alias I intended to make: alias k 'set ARGS1 =(\!1); set ARGS2 =(\!2); grep -i "$ARGS1" ARGS2' So that next time, for example, if I want to search the keyword "Help" in the path... (5 Replies)
Discussion started by: mar85
5 Replies

10. OS X (Apple)

Having trouble creating an alias for grep

Hi, I'm using Mac 10.9.1. I would like to create an alias for grep so that it won't print out messages like "grep: /Users/davea/workspace/myproject/subdir/: Is a directory" all the time. So in my terminal, I opened ~/.profile and entered alias grep='grep -s' However, when I close and... (5 Replies)
Discussion started by: laredotornado
5 Replies
CREATE TEXT SEARCH 
TEMPLATE(7) PostgreSQL 9.2.7 Documentation CREATE TEXT SEARCH TEMPLATE(7) NAME
CREATE_TEXT_SEARCH_TEMPLATE - define a new text search template SYNOPSIS
CREATE TEXT SEARCH TEMPLATE name ( [ INIT = init_function , ] LEXIZE = lexize_function ) DESCRIPTION
CREATE TEXT SEARCH TEMPLATE creates a new text search template. Text search templates define the functions that implement text search dictionaries. A template is not useful by itself, but must be instantiated as a dictionary to be used. The dictionary typically specifies parameters to be given to the template functions. If a schema name is given then the text search template is created in the specified schema. Otherwise it is created in the current schema. You must be a superuser to use CREATE TEXT SEARCH TEMPLATE. This restriction is made because an erroneous text search template definition could confuse or even crash the server. The reason for separating templates from dictionaries is that a template encapsulates the "unsafe" aspects of defining a dictionary. The parameters that can be set when defining a dictionary are safe for unprivileged users to set, and so creating a dictionary need not be a privileged operation. Refer to Chapter 12, Full Text Search, in the documentation for further information. PARAMETERS
name The name of the text search template to be created. The name can be schema-qualified. init_function The name of the init function for the template. lexize_function The name of the lexize function for the template. The function names can be schema-qualified if necessary. Argument types are not given, since the argument list for each type of function is predetermined. The lexize function is required, but the init function is optional. The arguments can appear in any order, not only the one shown above. COMPATIBILITY
There is no CREATE TEXT SEARCH TEMPLATE statement in the SQL standard. SEE ALSO
ALTER TEXT SEARCH TEMPLATE (ALTER_TEXT_SEARCH_TEMPLATE(7)), DROP TEXT SEARCH TEMPLATE (DROP_TEXT_SEARCH_TEMPLATE(7)) PostgreSQL 9.2.7 2014-02-17 CREATE TEXT SEARCH TEMPLATE(7)
All times are GMT -4. The time now is 11:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy