Search Results

Search: Posts Made By: albertogarcia
1,773
Posted By albertogarcia
Hello Duke, now I use virtualization (with...
Hello Duke,

now I use virtualization (with virtualbox) but I would like to access my hardware without virtualization, is quite different, for example with gpu.

WIndows7: for teaching reasons,...
1,773
Posted By albertogarcia
Partitions
Hello masters,

Actually, i am user of Ubuntu, but I want to use Debian too.

I have a computer with a product key for w7 so i will use too, only for games...

The structure I have thought is...
3,872
Posted By albertogarcia
two delimiters with awk, one of them blank
Hello,

I need use comma and spaces as field delimiters, but I can't:

text:
hello myfriend,I need,some help

I need something like:

awk -F"<blank>|," '{print $1, $3}'

Thanks
1,110
Posted By albertogarcia
I don't understand the problem. Could you...
I don't understand the problem.

Could you paste the code here?:confused:
4,391
Posted By albertogarcia
awk '{printf "%-12s%-12s%-12s%-7s\n", $1" "$2,$3"...
awk '{printf "%-12s%-12s%-12s%-7s\n", $1" "$2,$3" "$4,$5" "$6,$7}' IN_FILE
4,391
Posted By albertogarcia
only modify the positions as you like.. awk...
only modify the positions as you like..

awk '{printf "%-8s%-3s%-8s%-3s%-8s%-3s%-5s\n", $1,$2,,$3,$4,$5,$6,$7}' IN_FILE
3,318
Posted By albertogarcia
try with this... sed 's/\([^ ]\)[ ]\([^...
try with this...

sed 's/\([^ ]\)[ ]\([^ ]\)/\1\2/g' IN_FILE| sed 's/ / /g'

Sorry, this not works because 'jump' the characteres substitued... but this is a 'ugly' way:

sed 's/\([^ ]\)[...
1,325
Posted By albertogarcia
With awk..maybe: awk '{printf "%s", $0}...
With awk..maybe:

awk '{printf "%s", $0} END{print}' IN_FILE
1,325
Posted By albertogarcia
Hi, paste -s -d\0 IN_FILE
Hi,

paste -s -d\0 IN_FILE
2,651
Posted By albertogarcia
Hi, try with: cadena="hola que tal" i=0 ...
Hi, try with:

cadena="hola que tal"
i=0
for cad in $cadena
do
arrcad[$i]=$cad
i=$(($i+1))
done

echo ${arrcad[0]}
echo ${arrcad[1]}
echo ${arrcad[2]}
11,214
Posted By albertogarcia
maybe this?: awk 'BEGIN{printline=0;cont=1}...
maybe this?:

awk 'BEGIN{printline=0;cont=1} {if($2=="0xA")printline==1;if(printline==1 && cont<=10){print $0;cont++}}' IN_FILE
5,713
Posted By albertogarcia
maybe...with any modification... for element...
maybe...with any modification...

for element in $(ls -d *)
do
if [ -d $element ]
then
echo "directory: $element"
reciente=$(ls -lt $element | head -2 |tail -1)
echo...
1,722
Posted By albertogarcia
try with this... while read line do ...
try with this...

while read line
do
campo1=$(echo $line |cut -d"|" -f1)
campo2=$(echo $line |cut -d"|" -f2)

echo $campo1 --- $campo2
done < FILE_IN
1,908
Posted By albertogarcia
I don't know if this is what you need: tr -s...
I don't know if this is what you need:

tr -s "\n" " " < FICHERO_IN| awk -F, '{for (i=1;i<=NF;i++)print $i}'
2,276
Posted By albertogarcia
Hello, I recommend you read: Sed - An...
Hello,

I recommend you read: Sed - An Introduction and Tutorial (http://www.grymoire.com/Unix/Sed.html)

.* is:
. = any character
* = the "anterior" repeated any times

so, .* is "any...
2,276
Posted By albertogarcia
try: sed "150s/.*/HELLO/"...
try:

sed "150s/.*/HELLO/" FICHERO_IN
1,928
Posted By albertogarcia
Hello again! ..:) try with this: ...
Hello again! ..:)

try with this:
contador=0
salir=0
while [ salir -eq 0 ]
do
if [ -f fichero$contador ]
then
echo "fichero fichero$contador existe"
...
2,022
Posted By albertogarcia
Hi, try with this: while read linea do ...
Hi, try with this:

while read linea
do
fich1=$(echo $linea | cut -d" " -f2)
fich2=$(echo $linea | cut -d" " -f3)

if [ -e $fich1 ] && [ -r $fich1 ]
then
awk '{print $1}'...
3,032
Posted By albertogarcia
Hi, the problem is that the pipe creates a...
Hi,

the problem is that the pipe creates a new sub-shell...try using parenthesis:


cat dump | (while read line
do
if $line = $raqam
then
#i want here to...
11,145
Posted By albertogarcia
Hi, look for "awk", "cut" in man pages or in...
Hi,

look for "awk", "cut" in man pages or in the forum, there is a lot of similar problems solved.
1,871
Posted By albertogarcia
Hi, I think that when you do: for log in...
Hi,

I think that when you do:
for log in "${dir_array[@]}".log

the las log has the .log suffix.

Try with:

for log in "${dir_array[@]}"
do
log=$log.log
...and the rest
8,281
Posted By albertogarcia
the line number of the error is "11"? this...
the line number of the error is "11"?

this line doesn't appear in the code you've posted.
8,281
Posted By albertogarcia
Hello, other solution that could be used for...
Hello,

other solution that could be used for other languages is:

Create a file names (i.e) months with the content:
styczen:January
luty:February
marzec:March
...and so on...

then, if in...
7,017
Posted By albertogarcia
Hello uri_crack try with this: ...
Hello uri_crack

try with this:

num_lineas=1
contador_fichero=0
IFS='
'
while read linea
do
echo "$linea" >> fichero_salida$contador_fichero
if [ $num_lineas -eq 100 ]; then
...
8,281
Posted By albertogarcia
Hi echo hola | awk '{OFS="";print...
Hi

echo hola | awk '{OFS="";print toupper(substr($1,1,1)),substr($1,2)}'
Showing results 1 to 25 of 68

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