Search Results

Search: Posts Made By: Doc_RuNNeR
1,498
Posted By Doc_RuNNeR
Shell programmin is in a lot of cases very...
Shell programmin is in a lot of cases very similar like C language or other imperative language that you know. Think what you want the program does, write and finally y could be work. Answering your...
13,279
Posted By Doc_RuNNeR
In the aux file you have the solution ...
In the aux file you have the solution

#!/bin/bash

echo > aux
for i in `cat file1`
do
bool=1
for j in `cat file2`
do
if [ `echo $i` = `echo $j` ]
then
bool=0
...
2,283
Posted By Doc_RuNNeR
Now I am studying what can be wrong, but although...
Now I am studying what can be wrong, but although that program function, it does not resolve the problem you have, because first you asing a value for your var and then you change the value, but you...
22,718
Posted By Doc_RuNNeR
The problem is that find -mtime give us the...
The problem is that find -mtime give us the modify not create time.
22,718
Posted By Doc_RuNNeR
I have a similar question, because I donīt know...
I have a similar question, because I donīt know any cammand that give me the creation date because all the commands I know give me the modify date.

If anyone know the solution I am very pleasent
74,278
Posted By Doc_RuNNeR
Below I write a code with tow output the first...
Below I write a code with tow output the first one is to numeric arguments and the second if it isnīt numeric

#!/bin/bash
if echo $1 | grep "^[0-9]*$">aux
then
echo "La cadena es un valor...
3,158
Posted By Doc_RuNNeR
grep -v "^account1" file > newfile (without...
grep -v "^account1" file > newfile (without account1)
1,929
Posted By Doc_RuNNeR
If you want a shell script you can use that #!...
If you want a shell script you can use that
#! /bin/bash
espacios=IFS
IFS="
"
for i in `cat $1`
do
name=`echo $i | cut -d" " -f1`
echo $i > aux
cat $2 | grep "^$name " | cut -d" " -f2...
6,985
Posted By Doc_RuNNeR
If you want to compare two numbers with decimals...
If you want to compare two numbers with decimals provably you will do with awk.

Bye
13,032
Posted By Doc_RuNNeR
To remove it: $cat > remove #! /bin/bash ...
To remove it:

$cat > remove
#! /bin/bash
coma=IFS
IFS=","
for i in`cat file.txt`
do
if [ `echo $i` = <chain you like to delete> ]
then
echo $i >> file2.txt
fi
done
IFS=$coma...
2,342
Posted By Doc_RuNNeR
How will be the output of the file wich has all...
How will be the output of the file wich has all the accounts?

Accoun1
Account2
.....
.....

I think that i can do with a shell script but it is longer than nawk

Bye
16,655
Posted By Doc_RuNNeR
#! /bin/ksh spaces=IFS IFS=" " for i...
#! /bin/ksh

spaces=IFS
IFS="
"
for i in "hello world"
do
echo $i
done
IFS=$spaces

-----------------

Try that script
13,032
Posted By Doc_RuNNeR
cat <oldfile> | tr -s " " "," >...
cat <oldfile> | tr -s "
" "," > <oldfile>
16,655
Posted By Doc_RuNNeR
I donīt know a lot of english and i will to try...
I donīt know a lot of english and i will to try to explain it. If you have more questions you can ask again ;) . Ok the system has a variable, that for loop uses to know how many parameters has the...
2,284
Posted By Doc_RuNNeR
It is necesary to do it with awk? Because a...
It is necesary to do it with awk?

Because a script can do it

.........
cont=0
for i in `cat (the file)`
do
if [ `echo $i` = (the name you would like to find) ]
then
break;
else...
2,215
Posted By Doc_RuNNeR
I think that can be do for i in "$@" do ...
I think that can be do

for i in "$@"
do
if [ `echo $i` = y ]
then
#do everything you want
fi
done

Bye
2,562
Posted By Doc_RuNNeR
Maybe i can function $. principal_script...
Maybe i can function

$. principal_script var1 var2 var3 ......
........................
. subscript1 $var1 $var3
.......................
. subscript2 "$@" #if you like to pass all var

Bye
Showing results 1 to 17 of 17

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