Search Results

Search: Posts Made By: linuxUser_
17,471
Posted By fpmurphy
Look here for a good discussion on this issue: ...
Look here for a good discussion on this issue: Linking against older symbol (http://stackoverflow.com/questions/8823267/linking-against-older-symbol-version-in-a-so-file)
5,876
Posted By ongoto
Try this construct with sed... sed...
Try this construct with sed...
sed 's/^\<al\>/LONG/' test.txt
5,876
Posted By Don Cragun
ljunior-helper has already pointed out some of...
ljunior-helper has already pointed out some of the issues with your last post. Let me expand on that a little bit.

No. A sed substitute command will replace the text you tell it to match with...
5,876
Posted By junior-helper
I assume you used something like sed...
I assume you used something like sed 's/al/LONGsomething/g' file
The "problem" is /g means global replacement, thus sed will attempt to replace all occurences of the al string, no matter where in...
5,876
Posted By Don Cragun
What junior-helper suggested should make your sed...
What junior-helper suggested should make your sed command work. But, this thread is titled: "Echo printing a line in 2 lines; ecpected to print in one line". I don't see any echo commands and I...
5,876
Posted By junior-helper
The sed command is attempting to substitute the...
The sed command is attempting to substitute the string "c3h6ooh1-2" with "LONG0001 ", but it doesn't find that string, because you've put the string c3h6ooh1-2 inside quotes.

Try
sed -i...
39,677
Posted By RudiC
That's because Corona688's script creates and...
That's because Corona688's script creates and executes
fields=( "p U T" "p U" )
39,677
Posted By Corona688
This is an effort at doing it 'properly',...
This is an effort at doing it 'properly', counting brackets and fields. I had to cheat a lot, by converting it into something more readily understandable, stripping out all whitespace and newlines...
39,677
Posted By Corona688
Nobody understood it until you explained. ...
Nobody understood it until you explained.

What is obvious to you isn't obvious to us -- we can't see your computer. When you say "something doesn't work" and don't tell us what you did or...
39,677
Posted By Corona688
Posting "Does not work" without explanation does...
Posting "Does not work" without explanation does not help you or anyone. If a command does not work for you, please show the exact circumstances you used it, and the exact error or malfunction you...
39,677
Posted By RudiC
As I said, awk does NOT use shell variables like...
As I said, awk does NOT use shell variables like that, nor the $((...+1)) shell construct. As you are using bash, the process substitution might work. If awk ' ...
39,677
Posted By RudiC
I don't think that will work. You can't use shell...
I don't think that will work. You can't use shell variables inside an awk script. There is a mechanism to pass variables (cf. man awk), but you won't get back any values into variables except by...
39,677
Posted By RudiC
Why don't you give it a try? Every fieldname will...
Why don't you give it a try? Every fieldname will have its own array element.
EDIT: Oh, got you now. shells don't have those structures. Recent shells with associative arrays might allow for an...
39,677
Posted By RudiC
Try awk ' ...
Try awk ' {CNT=CNT+gsub(/{/,"")-gsub(/}/,""); if (CNT==1 && !/^ *$/) print "dictname[" ++dc "]=" $0}
/fields/ {for (i=3; i<NF; i++) print...
39,677
Posted By RudiC
I guess the regex [Pp]lane.*[Nn]ame.* (although...
I guess the regex [Pp]lane.*[Nn]ame.* (although ideal for the eample given) won't work for the general case. Try to describe in plain English WHAT you want to extract.

---------- Post updated at...
2,967
Posted By Makarand Dodmis
Buddy try[Makarand] # nawk -v var=`pwd` '{ if...
Buddy
try[Makarand] # nawk -v var=`pwd` '{ if ($0 ~ /^case_OM/) gsub($2,var,$0); { print $0 }}' FS="'" linux
hello
case_OM = PV4Reader( FileName='/hww/appl/test/testv/bin/mak_test' )
sdsdsd s1
...
1,994
Posted By RudiC
od (octal dump?) is a command to "dump files in...
od (octal dump?) is a command to "dump files in octal and other formats " (cf man od)
1,994
Posted By Don Cragun
This should rename your files for you: ls|awk '...
This should rename your files for you:
ls|awk '
/\r/ { new = $0
gsub(/\r/, "", new)
printf("mv \"%s\" \"%s\"\n", $0, new)
}' | sh
If you want to do this on a Solaris/SunOS...
1,656
Posted By wisecracker
Manually again as before:- Last login: Sat Sep ...
Manually again as before:-
Last login: Sat Sep 6 20:44:43 on ttys000
AMIGA:barrywalker~> VAR="0r2345.r123"
AMIGA:barrywalker~> echo "${VAR:0:7}${VAR:8:3}"
0r2345.123
AMIGA:barrywalker~> _
...
1,656
Posted By RudiC
Use bash's parameter substring expansion: echo...
Use bash's parameter substring expansion: echo ${var:6:2}.
1,656
Posted By wisecracker
Manually in OSX 10.7.5, default bash terminal:- ...
Manually in OSX 10.7.5, default bash terminal:-
Last login: Sat Sep 6 20:31:06 on ttys000
AMIGA:barrywalker~> SOME_STRING="1234ksj dflkjsdf 9398 7492834.9198 91283kfc"
AMIGA:barrywalker~>...
1,902
Posted By Scrutinizer
Good to hear :) 1. newvar=$(printf "%e\n"...
Good to hear :)

1.
newvar=$(printf "%e\n" "$(bc -l <<< "${EV/[eE]/*10^}*${DV/[eE]/*10^}" )")

2.
$ printf "%e\n" "$(bc -l <<< "${EV/[eE]/*10^}*${DV/[eE]/*10^}" )"
5.000000e-04
$ printf...
1,902
Posted By Scrutinizer
Yes, try: printf "%e\n" "$(bc -l <<<...
Yes, try:
printf "%e\n" "$(bc -l <<< "${EV/[eE]/*10^}*${DV/[eE]/*10^}" )"


or, for example:
sci_bc() {
printf "%e\n" "$(bc -l <<< "${1//[eE]/*10^}")"
}

sci_bc "$EV*$DV"
2,430
Posted By Scrutinizer
Another example of a read method (with that...
Another example of a read method (with that theoretical input sample), like pilnet101 suggested:

while IFS=$IFS\; read name val
do
case $name in
Heroname)
SF=$val ;;
...
2,430
Posted By SriniShoo
you can change the value of t to wharever time...
you can change the value of t to wharever time you wanted to grep
awk '$0 ~ ("^Time = " t "$") {getline;
for(i=1; i<=NF; i++)
{if($i ~ /^ExecutionTime$/) et=($(i+2) " " $(i+3))
else if($i ~...
Showing results 1 to 25 of 44

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