Search Results

Search: Posts Made By: Tártaro
2,513
Posted By Tártaro
I really missed it. I did. I thought it was an...
I really missed it. I did. I thought it was an example to illustrate the forum editing standards and didn't read it.
But if you are learning, i think there is nothing wrong with see different...
6,934
Posted By Tártaro
Thanks.
Thanks.
6,934
Posted By Tártaro
bash functions arguments
This script is called fuu;

#!/bin/bash

speak() {
case $1 in
1)echo one
;;
2)echo two
;;
3)echo...
2,513
Posted By Tártaro
I have this; #!/bin/bash for x in `cat...
I have this;

#!/bin/bash

for x in `cat -t file`
do
result=`echo $x | sed s:'^.*^I'::`
if [ $result -gt 1 ]
then
echo $x | sed s:'\^I: ':
...
5,172
Posted By Tártaro
Thank you guys.
Thank you guys.
5,172
Posted By Tártaro
thanks daPeach but this dosen't work for me...
thanks daPeach but this dosen't work for me because i need to sort the files before start the loop.
I'm going to do more things than just echo them;

a=1
for s in *
do
echo "$s ""---"" $a"...
5,172
Posted By Tártaro
Sorting in a for loop
when i use a for loop like this,

for s in *
do
echo $s
done

it give me the result in this fashion;

1
10
12
2
23
3

I need it sorted in numerical order, like this;

1
2
2,005
Posted By Tártaro
Thanks but this dosen't work.The problem is i...
Thanks but this dosen't work.The problem is i can't get $COLUMNS from the enviroment.

-----Post Update-----

i found myself the solution;

for ((a=$(tput cols);a>0;a--))
do
printf...
2,005
Posted By Tártaro
How import $COLUMNS from set into script
im trying to do this inside a bash script;

for ((a=$COLUMNS;a>0;a--))
do
printf "="
done
printf "\n"

With it i want to display an "equals" line as long as de curent shell window....
2,071
Posted By Tártaro
Thanks everybody; i got it.
Thanks everybody; i got it.
2,071
Posted By Tártaro
adding a list of numbers 3 by 3
i have a list of numbers like this;

124
235
764
782
765
451
983
909
...

and i want to make a sum with the first 3 of them then the next 3 and so on.

124+235+764=1123...
1,883
Posted By Tártaro
closing windows
Ok i know to open a window from a script (mac);

open whatever(name of a directory)

but i don't how to close it.

please some help.

thanks.
1,231
Posted By Tártaro
the various lines of a file in one
when i cat my file i see this:

a
b
c

and i want it like this:

a b c

what can i do?

thanks.
5,849
Posted By Tártaro
thanks AWK
thanks AWK
5,849
Posted By Tártaro
no count of spaces in cut
i want to give numbers to cut without worrying about the spaces;

echo "12 345 6 78 9" | cut -c 1-9

echo "123 456 789" | cut -c 1-9

echo "1 2 3 4 5 6 7 8 9" | cut -c 1-9

the output of...
18,949
Posted By Tártaro
thank you man.it works perfectly.
thank you man.it works perfectly.
18,949
Posted By Tártaro
variable inside awk '{print $c}'
i'm trying to do this (in bash darwin);

echo "give me some words: "
read a
c=2 # this is get by other ways
echo $a | awk '{print $c}' # i want to print the column given
...
4,717
Posted By Tártaro
how to close an .app without using Kill
I want to close an application but to kill it seems to me very rude.I want to let it do her things before closing.Any idea? Thanks.
Showing results 1 to 18 of 18

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