Search Results

Search: Posts Made By: cristi2008
2,837
Posted By cristi2008
sorry I wasn't to explicit. I just need the...
sorry I wasn't to explicit.
I just need the length of the name of that varable and not the content.thanks
2,837
Posted By cristi2008
length of a variable!
Hi everyone!
I have a question.
How can I limit the length of a variable?
If its bigger than 9 for example to stop sa script from running.
1,403
Posted By cristi2008
thanks. I didn't knew that can be solved...
thanks.
I didn't knew that can be solved whitout "getline"
thanks again.
1,403
Posted By cristi2008
SOLVED #!/bin/bash file=$1 awk ' { ...
SOLVED

#!/bin/bash
file=$1
awk
'
{
if ( NR % 2 == 0)
{ ( getline < "$file" )
print > "even.txt"
}
else
{ ( getline < "$file" )
print > "odd.txt"
}
}
' $file
1,403
Posted By cristi2008
Whats the problem whit my script???
I want to take the even-numbered lines from a file and put them in a separate file and the same thing with the odd-numbered lines.

#!/bin/bash
file=$1
awk
'
{
if ( NR % 2 == 0)
{ ((...
4,082
Posted By cristi2008
I didnt really understood. I'm looking for a...
I didnt really understood.
I'm looking for a solution more simple and not to use awk
#!/bin/bash

read file.txt
x= 'cut -f(2n) file.txt'
y='cut -f(2n+1) file.txt'

and somehow

x= new1.txt...
4,082
Posted By cristi2008
Okay! I dont realy understand! What I want to...
Okay!
I dont realy understand!
What I want to do!
I want to read a file and take the 2,4,6,.....rows from it an d put them in a separate file and do the same whit the 1,3,5,7,.... rows.
My...
4,082
Posted By cristi2008
okay! but the output i don't want to be the...
okay!
but the output i don't want to be the content of that file.
4,082
Posted By cristi2008
#!bin/bash (not) read x (but) command...
#!bin/bash

(not) read x (but) command something.txt
something like this
4,082
Posted By cristi2008
Input file!
I want that my input to be a file.To read a file as input.How can I do that?
3,904
Posted By cristi2008
ok! That was not so dificult.thanks Now what i...
ok! That was not so dificult.thanks
Now what i want is :
if its number to write it in reverse order and if it a text to write a message
"hey pal are you blind!you don't see that this is not a...
3,904
Posted By cristi2008
Because I've heard that this is the easyiest...
Because I've heard that this is the easyiest method and it could be a good start for me.Thanks!
3,904
Posted By cristi2008
ok! I didn't understood verry much but: I...
ok!
I didn't understood verry much but:
I need a script that starts whit
" #!/bin/bash
read number
......


echo $reversenumber "
something like this.
And please explain the...
3,904
Posted By cristi2008
My first program!
Hi to everyone!
I say from the begining the I'm new to shell scripting but I want to learn it.
My first request sound like this:
I would like to make a shell script the returns a number but in the...
Showing results 1 to 14 of 14

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