Search Results

Search: Posts Made By: anand.shah
Forum: Programming 07-22-2014
12,386
Posted By chacko193
When you declaredisplay() in the derived class,...
When you declaredisplay() in the derived class, it hides the base class display() instead of overloading it. So when you call the display() using a derived class object, you will get an error since...
Forum: Programming 06-18-2014
5,233
Posted By CarloM
Do you need to keep track of the line word counts...
Do you need to keep track of the line word counts until end of processing, or just can you just output them as you go?

If it's the latter then you only need to maintain your linked list while...
1,393
Posted By Don Cragun
When I try the code suggested by vidyadhar85,...
When I try the code suggested by vidyadhar85, pamu, Yoda, and anand.shah, I don't end up with anything that looks close to the output requested:
svn export ...
2,479
Posted By MadeInGermany
/source/ is too unprecise and risky. ...
/source/ is too unprecise and risky.
$1~/source/ is okay, and $1=="source" is precise.
2,479
Posted By Scrutinizer
Or perhaps this? sed -n...
Or perhaps this?
sed -n 's|cfg/config/|./non_Profile/app|p' file

--

Actually all this confusion could have been avoided if proper code tags...
2,479
Posted By Jotne
This should fix it. awk '{$1=$1}...
This should fix it.
awk '{$1=$1} /^source/{sub("cfg/config","./non_Profile/app",$0);print}'

You can also remove the ^
awk '/source/{sub("cfg/config","./non_Profile/app",$0);print}'
9,815
Posted By pamu
"`" won't work here.... try find ....
"`" won't work here....

try

find . -name amp.cfg | cut -c 3- | sed 's/\/amp.cfg$//'
3,111
Posted By michaelrozar17
It does not require any change to run in a shell...
It does not require any change to run in a shell script, just copy paste the sed or awk lines into a file and run. But remember to give full path name of the inputfile, its better coding.
$ cat...
1,680
Posted By elixir_sinari
echo ' /LDCA20/rel/prod/libina.a'|sed...
echo ' /LDCA20/rel/prod/libina.a'|sed '/libina\.a$/s///'
/LDCA20/rel/prod/
14,832
Posted By elixir_sinari
The awk command searches for a record whose first...
The awk command searches for a record whose first field ($1) matches the variable value supplied (variable what containing ProdId_A). For each such record, the split function is used to get, e.g.,...
14,832
Posted By elixir_sinari
prod='ProdId_A'; awk -F, -v what="$prod"...
prod='ProdId_A';
awk -F, -v what="$prod" '$1==what{split($5,b,"_");a=$2 FS b[2]}END{print a}' file
Showing results 1 to 11 of 11

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