Search Results

Search: Posts Made By: lost.identity
2,835
Posted By MadeInGermany
Put the umask command to the user's login files ...
Put the umask command to the user's login files
cd /home/shared
echo umask 002 >> .profile
echo umask 002 >> .login
2,835
Posted By RavinderSingh13
Hello, If I understand correctly, you can...
Hello,

If I understand correctly, you can use umask option here, as for giving permissions like 755,
we can use command like umask 002 so permissions will be set by the inverse of the umask...
1,058
Posted By Aia
Perhaps a heavily commented and hard coded...
Perhaps a heavily commented and hard coded example?

#!/usr/bin/perl

use strict;
use warnings;

my $in="file";

open my $fh, '<', $in or die "Could not read $in: $!\n";

# start reading...
1,673
Posted By MadeInGermany
awk '{print} NR==9{print "newline"}'...
awk '{print} NR==9{print "newline"}' file
1,673
Posted By Yoda
awk 'NR==10{print "line"}1' file
awk 'NR==10{print "line"}1' file
1,215
Posted By ctsgnb
Yes and... by the way the sed statement proposed...
Yes and... by the way the sed statement proposed by RavinderSingh13 also removed the dot in the numbers :

The expected :
723.187 2662.000
became
723187 2662000

which - i guess - is not...
1,215
Posted By Jotne
Your problem with this: awk...
Your problem with this: awk '/unburnt:.*burnt:/{Tu=$6;Tb=$NF}END{print Tu, Tb}' star.log is that you do the print in the END section. This will just print one instance.
Change it to:
awk...
1,215
Posted By ctsgnb
Did you try : awk '/unburnt:.*burnt:/{print $6,...
Did you try :
awk '/unburnt:.*burnt:/{print $6, $NF}' star.log
5,704
Posted By Don Cragun
Supposing that you have 1-3 digit user numbers,...
Supposing that you have 1-3 digit user numbers, you could also use:
awk '{print $2 }' ?.usr ??.usr ???.usr > data.txt
without needing to resort to sort and xargs. Obviously, you'll need more terms...
5,704
Posted By elixir_sinari
Don't blame awk. It's your shell doing the...
Don't blame awk. It's your shell doing the globbing in lexicographical order.

One way:
printf "%s\n" *.usr|sort -n|xargs awk '...'
9,725
Posted By RudiC
spacebar is right, but to fulfill your...
spacebar is right, but to fulfill your requirement of many files, you need to supply a number of files, like awk '...' DI*.DAT. Depending on your directory structure, you may want to use e.g. find to...
9,725
Posted By spacebar
You can 'print' your output found to a file, for...
You can 'print' your output found to a file, for example:
awk '/Sl.*thickness/ {Sl=$3;Tt=$NF}END{print FILENAME ":" Sl, Tt >> "data.out"}' DILAT.DAT
1,298
Posted By user8
Assuming that you are interested in the last...
Assuming that you are interested in the last field of rows containing "Thermal thickness"
awk '/Thermal thickness/ { Tt = $NF }'
1,174
Posted By Subbeh
export the variables and use $ENV{'i'} and...
export the variables and use $ENV{'i'} and $ENV{'j'} in your perl script.
1,174
Posted By Subbeh
Use single quotes to get these variables to work:...
Use single quotes to get these variables to work:
perl -i -pe '/open/&&s/t\d+_p\d+/t$ENV{'j'}_p$ENV{'i'}/' interp.f
1,298
Posted By user8
You can try: awk 'BEGIN{ print "sL0", "dL0",...
You can try:
awk 'BEGIN{ print "sL0", "dL0", "Tb","Tu"}/sL0.*dL0/{sL0=$3;dL0=$6}/Tb.*Tu/{ print sL0, dL0, $3,$6}'
8,855
Posted By Corona688
The problem with decompilers is that things like...
The problem with decompilers is that things like variable names, function names, class members, structure members, symbolic constants, and the like aren't preserved when source code is compiled into...
8,855
Posted By jim mcnamara
Linux I assume. objdump can show what the...
Linux I assume. objdump can show what the program is doing. There are decompilers
which produce assembler code (google for disassembler). In general most of these kinds of tools are not very...
1,031
Posted By Scrutinizer
for file in t*.dat do plot "'$file'" ... ...
for file in t*.dat
do
plot "'$file'" ...
done
1,031
Posted By rdcwayx
for i in {1..40}; do str=$(printf %05d $i)...
for i in {1..40};
do
str=$(printf %05d $i)
plot \'"t$str.dat"\' using 1:2
done
1,031
Posted By Yoda
How about:- printf "%s\n" t*.dat | sort | while...
How about:-
printf "%s\n" t*.dat | sort | while read file
do
plot '"$file"' using 1:2
done
2,386
Posted By cfajohnson
grep -v '^(\*064) 1' filename
grep -v '^(\*064) 1' filename
2,386
Posted By jp2542a
sed '/^(\*064) 1/d' filename You need to...
sed '/^(\*064) 1/d' filename

You need to escape the *
2,308
Posted By clx
Give a try.. find . -name '*.pdf' -type f |...
Give a try..
find . -name '*.pdf' -type f | while read FILE
do
pdftotext $FILE | grep -q "search phrase"
[ $? -eq 0 ] && echo $FILE
done
2,308
Posted By Don Cragun
If you create a file named grepPDF containing: ...
If you create a file named grepPDF containing:
#!/bin/ksh
for i in "$@"
do
pdftotext "$i" - | grep 'search phrase' > grepPDF.$$ && \
printf "\nFollowing lines are in...
Showing results 1 to 25 of 49

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