Sponsored Content
Top Forums Shell Programming and Scripting remove a path from PATH environment variable Post 302361845 by zaxxon on Wednesday 14th of October 2009 08:06:51 AM
Old 10-14-2009
You can try this:
Code:
rmv="test/rmve"
PATH=$(echo $PATH| sed -e 's!'$rmv'!!' -e 's/::/:/')
echo "PATH:" $PATH
export PATH

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How does the PATH and MANPATH environment variable get set?

Hi, How does the PATH and MANPATH environment variable get set? I want to add "/opt/SUNWspro/bin" to the search path for all the users. Where can I access this variable. I know in my home directory, depend on which shell I use, there are files such as .profile and .cshrc which I can edit to... (3 Replies)
Discussion started by: vtran4270
3 Replies

2. Shell Programming and Scripting

Path Environment Variable

Hi..... I'm kind of new to c programming in Unix...need help here. Supposed to write a source code to support Path environment variable for my programming assignment for Spring semester. but i'm kind of stuck. Could anyone out there assist me? prompt> /bin/ls My program could output... (3 Replies)
Discussion started by: tancy
3 Replies

3. Shell Programming and Scripting

:: in PATH environment variable

whats the meaning of :: colon in PATH environment? /usr/local/bin:/usr/bin:/usr/local/gnu/bin::.:/usr/local/bin:/usr/bin:/usr/local/gnu/bin:/usr/local/bin and whats the meaning of // in PATH ? (1 Reply)
Discussion started by: gfhgfnhhn
1 Replies

4. Shell Programming and Scripting

problem in getting the path of environment variable set in bashrc in my shell script

hi all i have joined new to the group. i have set an variable in my bashrc file. .bashrc PROGHOME=/home/braf/braf/prog export PROGHOME but while using it in my shell script its path is not taken and i had to explicitly give the export command to set the path. in my script... (8 Replies)
Discussion started by: krithika
8 Replies

5. UNIX for Dummies Questions & Answers

Path Environment

How do we change path environment? (2 Replies)
Discussion started by: mehmetned
2 Replies

6. Shell Programming and Scripting

one liner to extract path from PATH variable

Hi, Could anyone help me in writing a single line code by either using (sed, awk, perl or whatever) to extract a specific path from the PATH environment variable? for eg: suppose the PATH is being set as follows PATH=/usr/bin/:/usr/local/bin:/bin:/usr/sbin:/usr/bin/java:/usr/bin/perl3.4 ... (2 Replies)
Discussion started by: royalibrahim
2 Replies

7. Shell Programming and Scripting

Appending a path in user's PATH variable

Hello Folks, I want to append a path in user's PATH variable which should be available in current session. Background Numerous persons will run a utility. Aim is to add the absolute path of the utility the first time it runs so that next runs have the PATH in env & users can directly run... (6 Replies)
Discussion started by: vibhor_agarwali
6 Replies

8. Shell Programming and Scripting

Path a variable to sed that includes a path

Hi I'm trying to select text between two lines, I'm using sed to to this, but I need to pass variables to it. For example start="BEGIN /home/mavkoup/data" end="END" sed -n -e '/${start}/,/${end}/g' doesn't work. I've tried double quotes as well. I think there's a problem with the / in the... (4 Replies)
Discussion started by: mavkoup
4 Replies

9. Ubuntu

PATH environment variable

PATH is an environment variable. When I open a terminal say terminal 1 and set some path in PATH variable it gets set which I can see using ech $PATH. But when I open a new terminal say terminal 2 and fire echo $PATH why cannot I see the same output as seen in terminal terminal 1? Why the path... (4 Replies)
Discussion started by: rupeshkp728
4 Replies

10. Shell Programming and Scripting

Function to remove the directories from PATH variable

Hello, From the URL https://www.unix.com/shell-programming-scripting/121303-remove-path-path-environment-variable-2.html I got a function to remove the directories from a path. but looks like this isnt quite working.. i am also not able to post the comments in the thread as it is closed. ... (6 Replies)
Discussion started by: satishkumar432
6 Replies
YASAT(8)							     YASAT 526								  YASAT(8)

NAME
YASAT - simple stupid audit tool SYNOPSIS
yasat [--standard(-s)] [--list(-l)] [--debug(-d)] [--help(-h)] [--html(-H)] [--html-output PATH] [--advice-lang LANG] [--full-scan(-f)] [--plugins-dir(-P) PATH] [--nopause(-a)] [--plugin(-1) PATH] [--Plugin(-p) NAME] [--print-level X] [--check-update] DESCRIPTION
YASAT (Yet Another Stupid Audit Tool) is a simple stupid audit tool. Its goal is to be as simple as possible with minimum binary dependen- cies (only sed, grep and cut) Second goal is to document each test with maximum information and links to official documentation. It do many tests for checking security configuration issue or others good practice. It checks many software configurations like: Apache, Bind DNS, CUPS, PHP, kernel configuration, mysql, network configuration, openvpn, Packages update, samba, snmpd, squid, tomcat, user accounting, vsftpd, xinetd, OPTIONS
--standard (or -a) YASAT will performs a standard check of the system, printing out the results of each test to stdout. A log is also created in ~/.yasat/yasat.result by default --list (or -l) List all plugins available --html (or -H) YASAT will export results in html (default to ~/yasat/yasat.html) --html-output PATH With -H, this option permit to change the file where to store html output. --advice-lang LANG By default, YASAT print message in english (EN), you can change the displayed lang with this option. LANG is the 2letter digit of the lang you want. For the moment only EN is supported. --full-scan (or -f) YASAT will do extra (long) tests (lots of find). --plugins-dir PATH (or -P) Set the path where YASAT can find plugins to use. (default is ./plugins ) --nopause (or -a) By default, YASAT made a pause after each plugin. For automatize tests you can use this. --plugin PATH (or -1) YASAT will just use the plugin pointed by PATH (ex: yasat -1 kernel) --print-level x (or -1) YASAT will print infos equal or above the level X (All = 0 (default), infos = 1 warnings(orange) = 2, errors(red) = 3 --skip TEST A comma separated list of tests to skip without the .test (ex: --skip nfs,ntp). See yasat --list for all tests. --check-update Check if an update of YASAT exists --send-support Like --check-update, but it will send also as parameter your OS version for statistics. In the future, perhaps also a sort of send_bugs. LICENSING
YASAT is licensed under the GPL v3 license and under development by LABBE Corentin. CONTACT INFORMATION
All contacts informations could be found at http://yasat.sourceforge.net/ 526 21 May 2012 YASAT(8)
All times are GMT -4. The time now is 04:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy