Search Results

Search: Posts Made By: Kingcobra
1,294
Posted By Scrutinizer
@Kingcobra: could you elaborate what a...
@Kingcobra: could you elaborate what a consecutive space means to you. Is your input file is incorrect? What have you tried?


--
@Ravindersingh that is not a solution...
1,294
Posted By RavinderSingh13
Hello Kingcobra, Following may help you in...
Hello Kingcobra,

Following may help you in same.


echo "Wow what a wonderful feeling to be alive" | awk '{for(i=1;i<=NF;i++){if(i==4){print "HRUHRUHRUHRUHRUHRUHRUWRU"} {if(i==5){print...
1,294
Posted By Scrutinizer
Try: sed -e 's/\( *\) /\1WRU /g' -e :a -e 's/ ...
Try:
sed -e 's/\( *\) /\1WRU /g' -e :a -e 's/ \([HW]RU\)/ HRU\1/;ta' file

I believe there should be six HRU's (2nd until last -1) not 7, correct?
1,085
Posted By rdrtx1
use printf "%c" "$char" printf "$char" will...
use printf "%c" "$char"
printf "$char" will break if there is "%" character read.
1,085
Posted By MadeInGermany
while IFS="" read -r -n1 chardoes the trick. ...
while IFS="" read -r -n1 chardoes the trick.
BTW echo -e and echo -n are not portable, better get used to printf:
printf "%c" "$char"
or
printf "$char"
4,166
Posted By Chubler_XL
The attached updated version should work. It...
The attached updated version should work. It does use multi-byte characters and some awk implementations may not like this, I've only tested with GNU awk.
4,166
Posted By Chubler_XL
I've replaced to attached file with a new version...
I've replaced to attached file with a new version that avoids using UTF8 characters in awk so it should be more compatible with older awk implementations. However it looks like GNU sed is also...
4,166
Posted By Chubler_XL
Well using ls was just an example, the reason...
Well using ls was just an example, the reason --color is needed for the ls command is that it normally detects that the output isn't a terminal and avoids outputting any color escape sequences. This...
4,166
Posted By wisecracker
If I am reading your post correctly then you are...
If I am reading your post correctly then you are looking for the attributes to a string/character at any random part of an echo to a terminal.
This can't be done so you have no choice but to do it...
Showing results 1 to 9 of 9

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