hi,
i need to replace a line a file with a new raw device location..
original file..
/opt/sybase/ASE1502/ASE-15_0/bin/dataserver \
-d/data/TST_AKS1/sybdevices/master.dat \
-e/logs/sybase/TST_AKS1/SFO_TST_AKS1.log \
-c/apps/sybase/ASE1502/ASE-15_0/TST_AKS1.cfg \... (2 Replies)
I have a variable called PATH that contains a path
example: /Users/rtipton/Desktop/testusers/test
I need a sed command to set a variable called USER to the last directory name in that path
PATH="/Users/rtipton/Desktop/testusers/test"
and from that PATH i need USER to = test
I know sed... (4 Replies)
hi,
I have a file path like usr/scripts/pass/bin and usr/scripts/pass/line
I want to extract first three characters using sed
Like for path usr/scripts/pass/bin i want to extract usr/scripts/pass
and for path usr/scripts/pass/line i want to extract usr/scripts/pass (10 Replies)
Hi ,
Hi I want to know how can i extract file path using sed?
Eg: C:/folder1/abc/file.txt
Now , i want C:/folder1/abc/ only, So that i can move to that directory containing that file . So how can i do it using sed?
Thanks in Advance
Sarbjit (2 Replies)
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)
Hi,
I have following path:
set file_path = D:/forums/prac/somedir/new1/file1.txt
or set file_path = E:/new/forums1/prac/somedir/new2/file2.txt
I need to grep "somedir" from file path. In this case preceding directory "prac" remains same for both the paths, but directories preceding... (7 Replies)
Hi,
I want to remove a directory path from a file starting with the bracket using sed command.
eg.
(cd /man/abc/def ; \
aaaaa
bbbb
(cd /man/aaaa/aa; \
op.
aaaaa
bbbb
The "(cd /man" is to be consideres as the start.
I tries the below thing, but it didnt worked. Can anyone help.... (3 Replies)
Hi,
I am attempting to find the path /subject/grin* and replace it with /subject/$i
My attempt:
for i in $(ls)
do
sed -e 's:"/subjects/grin.*":"/subjects/$i.*":g'
and several variants with no luck. Please help. Thanks! (8 Replies)
Hello all!
I am on Mac (10.8.4) and my shell tcsh (man says version: Astron 6.17.00). Just to precise my tcsh:
echo $LC_CTYPE
UTF-8
I want to replace all ':' with a new line, to get all paths on one line. I don't find a way to make my shell accept the "\n"
My start was:
echo... (17 Replies)
Discussion started by: marek
17 Replies
LEARN ABOUT CENTOS
readlink
READLINK(1) User Commands READLINK(1)NAME
readlink - print resolved symbolic links or canonical file names
SYNOPSIS
readlink [OPTION]... FILE...
DESCRIPTION
Print value of a symbolic link or canonical file name
-f, --canonicalize
canonicalize by following every symlink in every component of the given name recursively; all but the last component must exist
-e, --canonicalize-existing
canonicalize by following every symlink in every component of the given name recursively, all components must exist
-m, --canonicalize-missing
canonicalize by following every symlink in every component of the given name recursively, without requirements on components exis-
tence
-n, --no-newline
do not output the trailing delimiter
-q, --quiet,
-s, --silent
suppress most error messages
-v, --verbose
report error messages
-z, --zero
separate output with NUL rather than newline
--help display this help and exit
--version
output version information and exit
GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report readlink translation bugs to <http://translationpro-
ject.org/team/>
AUTHOR
Written by Dmitry V. Levin.
COPYRIGHT
Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO readlink(2), realpath(1), realpath(3)
The full documentation for readlink is maintained as a Texinfo manual. If the info and readlink programs are properly installed at your
site, the command
info coreutils 'readlink invocation'
should give you access to the complete manual.
GNU coreutils 8.22 June 2014 READLINK(1)