Search Results

Search: Posts Made By: shailesh_arya
3,091
Posted By shailesh_arya
sed
thanks. it works.
BR
shailesh
3,091
Posted By shailesh_arya
replacing using sed
its again sed question. i have line -

sed "s/$old/$new/g" "$f" > $TFILE && mv $TFILE "$f"
working well if
old="myoldfile"
new="mynewfile"
but if i want
old="/home/shailesh/1test/"...
2,045
Posted By shailesh_arya
string
thx. its working
2,045
Posted By shailesh_arya
string
i mean by which command you changed that variable
my variable is only
searchpath="/home/shailesh/project/debug"

i want to add /*.mk on the tail of this variable like
newvar=something operation...
2,045
Posted By shailesh_arya
string
but how to convert searchpath="/home/shailesh/project/debug" to
searchpath="/home/shailesh/project/debug/*.mk"
shailesh
2,045
Posted By shailesh_arya
update a string variable and use in....
Hello Forun,

i have a variable searchpath="/home/shailesh/project/debug"
i want to make it like searchpath="/home/shailesh/project/debug/*.mk"

and want to use this like for finding all *.mk...
92,527
Posted By shailesh_arya
cat
yes if we do echo "$DPATH" it gives proper result. but when i want to use this variable for another use like as below -

for f in "$DPATH" `find -type f`;
do
processLine
done

it give wrong...
92,527
Posted By shailesh_arya
cat
oops not working...
:(

also i want to use this variable further in my script
BR
shailesh
92,527
Posted By shailesh_arya
redirect cat to variable
hello
just i saw a really strange for cat

i have file (file1) contains line /home/rajiv/proj1/*.txt

now applied a commonds

DDPATH="$(cat file1)"
echo $DDPATH

it shows all the txt...
4,202
Posted By shailesh_arya
sed
it works. thanks
BR
shailesh
4,202
Posted By shailesh_arya
sed for adding word
hello

i have a file (myfile) contains line as follows

/home/mytarget/myproject

i want to add a pattern at the end of this line.
my pattern is- /.*mk
i want like it -...
1,831
Posted By shailesh_arya
sed
thanks. the first solution works fine. second one is not working i.e. not gicing the same output as 1st.

BR
Shailesh
1,831
Posted By shailesh_arya
want to use variable in sed
hello

i have following sed command works fine.
sed -n 's/.*-L\([^ ]*\)myproject.*/\1/p' makefile > m

here search words are -L and myproject

now i want to replace these words by...
3,946
Posted By shailesh_arya
sed
thanks a lt. now it works for linux also as follows -

sed -n 's/.*-L"\([^ ]*\)myproject.*/\1/p'
3,946
Posted By shailesh_arya
sed
original it is like following

-include ../makefile.defs
# Add inputs and outputs from these tool invocations to the build variables
# All Target
all: myproject
# Tool invocations
myproject:...
3,946
Posted By shailesh_arya
sed
just to note-
the paragraph i have given is only a part of file. the actual file is makefile for C++ project. which containing so many lines of the same text.
3,946
Posted By shailesh_arya
sed
my OS is open SUSE 10.3 and sed version is "GNU sed version 4.1.5". surprised why it is not working. i did the same on my machine and nothing comes out.
BR
shailesh
3,946
Posted By shailesh_arya
sed
now it is not printing anything :(
br
shailesh
3,946
Posted By shailesh_arya
sed
no it is not helping. i need only "C:\Users\myname\workspace", part but is printing the whole paragraph. i only want to print above line. dosent matter how many times come in the file. hope i...
3,946
Posted By shailesh_arya
print text between to word using shell
hello all
i need help to print text between -L and \myproject using bash shell command on following text. i am using sed to do but not get success. i want to print only C:\Users\myname\workspace\....
Showing results 1 to 20 of 20

 
All times are GMT -4. The time now is 04:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy