I decided I wanted to have the cd command print my full working directory after each cd command, so I put this cw command in .bashrc as a function.
While this works I would like pwd to print escapes when a space in a directory name exists. This would then make it easy for me to copy and paste as opposed to putting it in quotes.
I would prefer the output to be:
unfortunately pwd does not have any option for this.
I want to replace a string which contains "/" in vi but what is the escape character for forward slash?
e.g. I have a text file with the contents below and I want to replace "/Top/Sub/Sub1" with "ABC".
/Top/Sub/Sub1
The replace command I am using is ... (4 Replies)
Hi ,
I want to change space to ' in my script.
I tried doing this,
sed 's/ /\'/g' filename
but i could not get it.
can some one help me please.
Thanks,
Deepak (4 Replies)
Hi All,
How do i write in sed for the 6th and 7th field of etc/passwd file as it involves "/" character?
Does mine below is correct? It's incomplete script as i need help with syntax as i always getting may errors :(
Example of etc/passwd file:
blah:x:1055:600:blah... (6 Replies)
Hello experts
I am trying to write a shell script which will add ' ' to a unix variable and then pass it to oracle for inserting to a table.
I am running the script as root and I have to do a su -c .
The problem is the character ' is not recognised inside sed even after adding escape... (1 Reply)
my @array;
my $sepa = "|";
print $sepa;
open FH, "<100_20091023_2.txt";
while(<FH>){
push @array, split(/\$sepa/, $_);
print "@array\n\n";
}
I am not able split the line which have | separated (1 Reply)
All ,
i have input line as below .
abc\ , ewioweioi \,
and want the output as below removing the "\"
abc , ewioweioi ,
could anyone help me out (2 Replies)
I need to change a pattern with single quotes
# echo "serversignature: 'On'"
serversignature: 'On'
I did
# echo "serversignature: 'On'" | sed 's/.*serversignature.*/serversignature: 'Off'/'
serversignature: Off
The output I need is with single quotes. But its swallowing it.
... (2 Replies)
friends,
I have a situation where i am using a $RANDOM function along with the filename, I want this to be escaped by the OS in the first assignment (works as expected) and executed in the second assignment (does not execute $RANDOM)
filename1=filename1_\$RANDOM
echo $filename1... (3 Replies)
Hi ,
I am looking for a function which will do the following.
1. I have a variable which will hold few special chracter like
SPECIAL_CHARS="& ;"2. I have an escape character.
ESCAPE_CHAR="\"3. Now when I passed some string in the function it will return the same string but now it will... (8 Replies)
Discussion started by: Anupam_Halder
8 Replies
LEARN ABOUT OSF1
pwd
pwd(1) General Commands Manual pwd(1)NAME
pwd - Displays the pathname of the current working directory
SYNOPSIS
pwd
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
pwd: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
None
OPERANDS
None
DESCRIPTION
The pwd command writes to standard output the full pathname of your current working directory. All directories are separated by a /
(slash). The first / represents the root directory and the last directory named is your current working directory.
EXIT STATUS
The following exit values are returned: Successful completion. An error occurred.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of pwd: Provides a default value for the internationalization variables that are
unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari-
ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value,
overrides the values of all the other internationalization variables. Determines the locale for the format and contents of diagnostic mes-
sages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES.
SEE ALSO
Commands: cd(1), csh(1), ksh(1), Bourne shell sh(1b), POSIX shell sh(1p)
Functions: stat(2), getcwd(3)
Standards: standards(5)pwd(1)