Search Results

Search: Posts Made By: LinQ
6,382
Posted By RudiC
Tryfind . -printf "%T@ %Tc %p\n" | sort -r | cut...
Tryfind . -printf "%T@ %Tc %p\n" | sort -r | cut -d" " -f2-
6,382
Posted By RudiC
How far would find . -printf "%T@ %p\n" | sort...
How far would
find . -printf "%T@ %p\n" | sort -r
get you?
1,252
Posted By jgt
use the mod function. if mod (n,2) =0 then n is...
use the mod function. if mod (n,2) =0 then n is an even number.
2,399
Posted By Aia
There is no problems for Perl using the hidden...
There is no problems for Perl using the hidden directories and files, the issue is with ~. It does not translate to home like in the shell.
Please, try:
while ( -e "$ENV{'HOME'}/.somedir/testFile"...
2,399
Posted By Corona688
That sounds fishy to me as nothing about UNIX...
That sounds fishy to me as nothing about UNIX except ls cares about hidden files and folders.

You know what? It doesn't work on non-hidden dirs either. It always fails, because ~/ which is a...
1,280
Posted By vgersh99
something like this with awk: awk -v qq='"'...
something like this with awk:

awk -v qq='"' '{if (match($0, qq "[0-9.][0-9.]*" qq)) print substr($0,RSTART+1, RLENGTH-2)}' myFile
or with sed:

sed -n 's/.*"\([0-9.][0-9.]*\)".*/\1/p' myFile
1,280
Posted By derekludwig
LinQ - sed -n -e...
LinQ -

sed -n -e 's/^.*string"\([^"]*\)".*$/\1/p' file will print only the target strings, skipping those lines that don't match.

- DL
Forum: Programming 12-13-2014
1,270
Posted By ongoto
You are right; those are not comments but they...
You are right; those are not comments but they are ignored by C. I believe they are compiler directives.
Forum: Programming 12-13-2014
1,270
Posted By Don Cragun
The #if, #else, and #endif are C pre-processor...
The #if, #else, and #endif are C pre-processor directives. If the macro PERL_VERSION expands to a value greater than 7, the code between the #if and the #else will be compiled into the program;...
1,143
Posted By Corona688
netstat can't tell you web addresses -- all it...
netstat can't tell you web addresses -- all it knows is what IP connected to what IP at what port, everything else is buried inside HTTP protocol.

I use tinyproxy (https://banu.com/tinyproxy/) for...
3,466
Posted By achenle
man yes
man yes
3,466
Posted By RudiC
I'm afraid that redirection is problematic as...
I'm afraid that redirection is problematic as dpkg-reconfigure doesn't read from stdin as an strace shows:write(7, "\33[4mAutomatically download and i"..., 64Automatically download and install stable...
14,081
Posted By ygemici
Hi LinQ, without calling boot-info-table...
Hi LinQ,
without calling boot-info-table results :)
we need to go to as root code for some points.
let us examine.

isolinux.asm...
14,081
Posted By Corona688
A unionfs mount could effectively allow that...
A unionfs mount could effectively allow that folder to be "written" to, as well.
14,081
Posted By ygemici
ok you want to recreate the own iso-file but fot...
ok you want to recreate the own iso-file but fot the "-boot-info-table" options trigger the mkisofs/genisoimage so it wants to regenerate the boot table located is in the your boot-image and then its...
1,250
Posted By Corona688
That is pretty funny :) /dev/ is folder...
That is pretty funny :)

/dev/ is folder where device files are kept -- the files UNIX/Linux need to access, among other things, disks. You opened your new partition overtop of that, blocking them...
1,250
Posted By gull04
Hi, Mounting a file system on a directory...
Hi,

Mounting a file system on a directory causes all below the directory to vanish until the file system is unmounted - not that easy when you have no device tree (/dev)

Regards

Dave
1,250
Posted By derekludwig
Yes, you will have to edit /etc/fstab to add or...
Yes, you will have to edit /etc/fstab to add or change the entry for your new filesystem. Are you getting an error when you try:
mount -t ext4 /dev/something /mnt
1,958
Posted By Aia
man s2p or s2p -h or perldoc.perl.org...
man s2p or s2p -h or perldoc.perl.org (http://perldoc.perl.org/s2p.html)

s2p -e 's/first/last/g'
4,147
Posted By bartus11
You can also do something like this: ...
You can also do something like this:
#!/usr/bin/perl

use strict;
use warnings;
use diagnostics;

qx'sed -i "s/Hi Mom!\|Hi Dad!/Bye Everyone!/I" ./test.txt';

No more double backslash, but...
716
Posted By Corona688
Try @ARGV=glob('./*.txt'); unshift(@ARGV,...
Try

@ARGV=glob('./*.txt');
unshift(@ARGV, "./afile.dat");
4,147
Posted By MadeInGermany
You need two \\ because... perl passes one \ to...
You need two \\ because...
perl passes one \ to a shell,
the shell finds the \ within a 'string' and leaves it unchanged,
sed finds \|
Bingo.
If the shell would find the \ outside a 'string' it...
4,147
Posted By bartus11
Try:#!/usr/bin/perl use strict; use...
Try:#!/usr/bin/perl

use strict;
use warnings;
use diagnostics;

`sed -i 's/Hi Mom!\\|Hi Dad!/Bye Everyone!/I' ./test.txt`;
1,026
Posted By Aia
Like this? find ./directory -exec stat -c "%a...
Like this?
find ./directory -exec stat -c "%a %n" {} \;
1,487
Posted By MadeInGermany
You can set the directory prior to calling...
You can set the directory prior to calling script.b
(
cd nextDir
bash script.b
)
pushd nextDir
bash script.b
popd
Showing results 1 to 25 of 64

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