Search Results

Search: Posts Made By: allthanksquery
Forum: Programming 01-18-2020
20,630
Posted By GRMartin
No, they are not at all the same thing. An...
No, they are not at all the same thing. An archive is just that. A collection of object files that can be statically linked to your executable. Shared objects are dynamically linked at runtime. They...
Forum: Programming 01-17-2020
20,630
Posted By Neo
Just because a liib is updated ... you do not...
Just because a liib is updated ... you do not have to recompile at all if your static binary is working fine.

In addition, shared libs can introduce major IT security issues.

There is "No Free...
Forum: Programming 01-15-2020
20,630
Posted By GRMartin
If you link to a shared library intead of the...
If you link to a shared library intead of the archive it's a little more complicted. If the shared library isn't installed in a directory know to the loader then you need to tell it where to find it....
13,679
Posted By MadeInGermany
Thank you! I have never heard of the boot -F...
Thank you! I have never heard of the boot -F failsafe before.
Have read about it now: an Oracle article says it must exist as /platform/`uname -m`/failsafe.
I have access to an older Solaris 10...
82,964
Posted By chipcmc
-All the tab spaces got removed and treated as...
-All the tab spaces got removed and treated as single blankspace.
cat file | sed "s/\t\t*/ /g"
All the blank spaces were removed and treated as single blank space.
cat file | sed "s/ */ /g"...
7,695
Posted By vbe
Welcome on board! start by removing the \n...
Welcome on board!

start by removing the \n of you printf on first line... maybe replacing with :
7,476
Posted By RudiC
Would this...
Would this (https://www.unix.com/303046306-post5.html) point you in the right direction to adapt your script?
Forum: What is on Your Mind? 05-03-2020
11,173
Posted By Neo
Community.UNIX.com login tips
Here are some tips for logging in to our new Community (https://community.unix.com/):


If you are a forum member with a valid email address in your profile and you have not logged in to...
15,372
Posted By vbe
the only ways are either add lines in your job...
the only ways are either add lines in your job script to echo anything in a log file or to output the execution of the script to a log file you open in another terminal using tail -f which will show...
67,851
Posted By apmcd47
Try appending this to your command: 2>...
Try appending this to your command:


2> >(grep -v 'No such file or directory' >&2)
It should remove the above message from the STDERR but allow other messages to be printed.


Works for bash...
13,179
Posted By RudiC
Try this: awk '$1 == "Name"; $4 < 7000 {print |...
Try this:
awk '$1 == "Name"; $4 < 7000 {print | "sort -k4"}' file
Name tDesignation tDepartment tSalary
Thomas Manager Sales 5000
Jason Developer Technology 5500
Vicky...
8,902
Posted By RudiC
Redirection works identical for input as well as...
Redirection works identical for input as well as for output. Try
$ mv /tmp/new_file /tmp/old_file
$ while read product id features
do printf "${product}, %s\n" ${features%#*}
done <...
8,902
Posted By apmcd47
That is close - try this while read product id...
That is close - try this
while read product id features
do
printf "${product}, %s\n" ${features%#*}
done < Check_FileYour example was using only two variables (f1, f3) to read the fields...
9,700
Posted By RudiC
That's because if your first printout trigger /-/...
That's because if your first printout trigger /-/ is hit, only that array element is set yet. On top, all further date/time stamps do not match the data printed with them; the data are shifted one...
9,700
Posted By aigles
A possible solution : $ cat ./eshaqur.sh awk...
A possible solution :
$ cat ./eshaqur.sh
awk '
function printValues() {
if (Values) {
print S, Date, Value["NSMSSMRLTOT"],
...
13,179
Posted By RudiC
It doesn't. It would remove any line with an...
It doesn't. It would remove any line with an emtpy $1, of which there is none. You can leave it out entirely. The $4 < 7000 removes the header line. $4 > 7000 would not; we'd need a different...
16,309
Posted By RudiC
Or, awk: awk -F"[,;]+" 'NR == 1 {print; next}...
Or, awk:
awk -F"[,;]+" 'NR == 1 {print; next} {for (i=2; i<=NF; i++) print $1, " " $i}' OFS=, file
Name , Company_Worked (Header)
Asley, IBM
Asley, Amazon
Asley, BOA
Asley, Google
King.Jr,...
16,309
Posted By nezabudka
Hi How about sed? sed -r...
Hi
How about sed?
sed -r ':1;s/^([^,]+)\s*,\s*([^;]+);/\1, \2\n\1, /;t1' file
Name , Company_Worked (Header)
Asley, IBM
Asley, Amazon
Asley, BOA
Asley, Google
King.Jr, Wipro
King.Jr,...
16,309
Posted By MadeInGermany
A shell script with only shell builtins: ...
A shell script with only shell builtins:
#!/bin/sh
set -f # unquoted $f2
IFS=";"
while IFS="," read f1 f2
do
printf "$f1, %s\n" $f2
done < file
9,156
Posted By rbatte1
Could you store a 'previous last line' value...
Could you store a 'previous last line' value somewhere to use between runs? That way you could:-
Copy the log file to a temporary directory (to get a fixed file to work with)
Read the 'previous...
16,309
Posted By Skrynesaver
$ cat ~/tmp.dat Name , Company_Worked (Header) ...
$ cat ~/tmp.dat
Name , Company_Worked (Header)
Asley,IBM;Amazon;BOA;Google
King.Jr,Wipro;Microsoft;AMZ

$ perl -ne 'chomp;($name,$emp)=split/,/;for (split/;/,$emp){print "$name, $_\n";}'...
63,732
Posted By wisecracker
Not sure if this is what you re after but fully...
Not sure if this is what you re after but fully POSIX compliant:-
Longhand OSX 10.14.3, default bash terminal calling dash.
Last login: Wed Apr 29 21:46:11 on ttys000
AMIGA:amiga~> dash...
13,179
Posted By sea
I slightly modified your code... Was not my...
I slightly modified your code...
Was not my first attempt, just one of the... lets do this variant with the current variable... moments...

I have no idea WHY this works, because I wanted to...
16,938
Posted By nezabudka
Hi So, passed by ... grep...
Hi
So, passed by ...
grep --include=*.{org,texi}

--- Post updated at 22:03 ---


Maybe I misunderstood something
grep -hrm8 '.' --include=*.{org,texi} ./
13,179
Posted By sea
Dont do BOLD for code. Do CODE for code. ...
Dont do BOLD for code.
Do CODE for code.

And proper writing helps.... tSalary....
Or use grep -i ...

And btw...
Your code would not show the 'header' on occasion, but always...
Unless your...
Showing results 1 to 25 of 500

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