Search Results

Search: Posts Made By: Leo Gutierrez
11,636
Posted By Leo Gutierrez
char cmd[100]=""; printf("%d\n",...
char cmd[100]="";
printf("%d\n", chdir("/usr1/mydir/"));
sprintf (cmd, "/bin/rm -f %s,%s,%s","/usr1/mydir/", "1.t","2.t","3.t");
system(cmd);
11,112
Posted By Leo Gutierrez
I'm using bash, which shell are you using? ...
I'm using bash, which shell are you using?

leo@leo-desktop:~/Escritorio$ bash shell.sh
FINDING THE FILES IN THE CURRENT PATH : camel.ico
THE FILE NAME IS' camel.ico 'PLEASE COMFIRM with Y OR N...
11,112
Posted By Leo Gutierrez
#!/bin/bash read -p "FINDING THE FILES IN THE...
#!/bin/bash
read -p "FINDING THE FILES IN THE CURRENT PATH : " a
read -p "THE FILE NAME IS' $a 'PLEASE COMFIRM with Y OR N : " b
if [ "$b" = "Y" ]
then
find . -name "$a"
elif [ "$b" = "N" ]...
4,031
Posted By Leo Gutierrez
Clearer: #!/bin/bash # Array declare...
Clearer:

#!/bin/bash

# Array
declare -a numeros=(
$(
for i in $(seq 1 1 7)
do
echo -e `expr ${RANDOM} % 100`
done
)
);
# Integer variable
declare -i i=0;...
49,303
Posted By Leo Gutierrez
@echo off setlocal enabledelayedexpansion if...
@echo off
setlocal enabledelayedexpansion
if "%1" == "" (
echo Error
exit /b 1
)

for /f "tokens=1,2,3 delims=-" %%a in ("%1") do (
set /a yearStart=%%c - 1
set...
10,633
Posted By Leo Gutierrez
@echo off for /f "tokens=2 delims=:" %%_ in (' ...
@echo off
for /f "tokens=2 delims=:" %%_ in ('
^(
echo 3^,3l
echo e
^) ^| edlin /b FILEIN.TXT
') do (
echo %%_ > OUT.TXT
)
exit /b 0


C:\>type FILEIN.TXT
Dan
Brown
El...
1,882
Posted By Leo Gutierrez
type first.txt >> out.txt echo. >> out.txt ...
type first.txt >> out.txt
echo. >> out.txt
type first.txt >> out.txt
5,584
Posted By Leo Gutierrez
¿where is the code?
¿where is the code?
4,781
Posted By Leo Gutierrez
try this
cls
@echo off
echo.
echo ======================
echo EXECUTING POST SCRIPT
echo ======================
echo.

:username
SET /p username_=Enter username:
if not defined username_...
9,766
Posted By Leo Gutierrez
#!/usr/bin/perl open(my $file, q[<],...
#!/usr/bin/perl
open(my $file, q[<], "file.txt") or die("$!");
while(my $line = <$file>)
{
$line =~ s/\s+/\n/g;
print $line, "\n";
}
close($file);
1,708
Posted By Leo Gutierrez
You're right.
You're right.
1,708
Posted By Leo Gutierrez
my @shortname = map { s/(..)\D*(.*$)/$1$2/; $_ }...
my @shortname = map { s/(..)\D*(.*$)/$1$2/; $_ } @longname;
2,684
Posted By Leo Gutierrez
perl -E '$s = qq(<INPUT DATABASE ="ORACLE" DBNAME...
perl -E '$s = qq(<INPUT DATABASE ="ORACLE" DBNAME ="UNIX" NAME ="FACT_TABLE" OWNERNAME ="DIPS">); print($s =~ m/.*\bNAME\s=["](.*)["]\s.*/);'
1,421
Posted By Leo Gutierrez
echo -e "c:/test/sample/" | tr '/' '\\'
echo -e "c:/test/sample/" | tr '/' '\\'
Forum: Ubuntu 08-22-2010
2,706
Posted By Leo Gutierrez
Lost symbols in keyboard distribution
Hi, mi question it's a little extrange

I'm using Ubuntu 9.04 - Jaunty Jackalope

I've elected my keyboard distribution, but i can't found some keyboard keys, as <, > symbols, i really need this...
1,708
Posted By Leo Gutierrez
Thanks.
Thanks.
1,708
Posted By Leo Gutierrez
Thanks for answer. In vi, i can define...
Thanks for answer.

In vi, i can define abbreviations with:
:ab etc ETCCCCC

But when i close my editor, these abbreviations are lost.

PD : Sorry for my wrong english
1,708
Posted By Leo Gutierrez
Save abbrevations in vi
Hi, ¿how i can to save abbrevations in vi?
6,264
Posted By Leo Gutierrez
find . -type f -name "${3}.*gz" -print ...
find . -type f -name "${3}.*gz" -print

leo@lein:~/Escritorio/shit$ ls -1
MINUTES.REF_STG.12156.txt.tar.gz
MINUTES.REF_STG.15553.txt.tar.gz
MINUTES.REF_STG.16522.txt.tar.gz...
7,708
Posted By Leo Gutierrez
Con perl no he tratado de hacerlo, voy a ver si...
Con perl no he tratado de hacerlo, voy a ver si te hallo una solución, pero com bash si podrías hacerlo, usando "sort", pero te quedaría ordenado el texto.

leo@lein:~/Escritorio$ cat file.txt
sil
a
b...
15,042
Posted By Leo Gutierrez
find -maxdepth 1 -name '*.txt' | xargs rm ;)
find -maxdepth 1 -name '*.txt' | xargs rm
;)
15,042
Posted By Leo Gutierrez
rm `find -name "*.txt" `
rm `find -name "*.txt" `
1,387
Posted By Leo Gutierrez
ls -l *.pdf > "pdffiles.txt"
ls -l *.pdf > "pdffiles.txt"
14,623
Posted By Leo Gutierrez
find -maxdepth 1 -name "*.pdf" -print find...
find -maxdepth 1 -name "*.pdf" -print
find -maxdepth 1 -name "*.pdf" -print | wc -l
2,409
Posted By Leo Gutierrez
#!/usr/bin/bash for file in `cat "file.txt" |...
#!/usr/bin/bash
for file in `cat "file.txt" | grep -v "shhshshs" | awk '{print $1}'`
do
echo ROW $file
doneleo@lein:~/Escritorio$ cat file.txt
ab1 gegege swgdeyedg
ac2 jxjjxjxjxxjxjx
ad3 ...
Showing results 1 to 25 of 32

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