Search Results

Search: Posts Made By: viored
1,313
Posted By viored
Using variable from shell script in perl file
Hey,

So I have a shell script that outputs some variables, call them $a and $b. I know in shell scripting if I wanted to use the variables in another shell script I'd do

sh code.sh "$a" "$b"
...
1,446
Posted By viored
Wow, you guys are the best. I couldn't have asked...
Wow, you guys are the best. I couldn't have asked for a better explanation. This is going to make so much of my work cleaner and easier. Thank you.
1,446
Posted By viored
General question about passing variables among shell scripts
So this is something I've been wondering how to do for a while. Suppose I have two shell scripts a.sh and b.sh

script a does some function and outputs to a varable $x . I would then like to take...
960
Posted By viored
Of course, I'm dumb. Thanks.
Of course, I'm dumb. Thanks.
960
Posted By viored
Copying character at certain position
So I'm iterating through a series of strings and I want to pick out a character in a certain position
so if I have the string

abcde
asigned to the variable $B.
Let $i=2, then I'd like it to...
1,053
Posted By viored
Passing variables and setting them
So I'm writing a script to generate pairwise scores for how similar two strings are, and while I've been able to get it to work on a single script, I've been unable to iterate it.

So suppose I...
1,145
Posted By viored
Thanks, you guys are the best.
Thanks, you guys are the best.
1,145
Posted By viored
Add string number to lines
So I have a file in the form


>
akdfvcnciejcndmdjfk
>
kdjkkkifjeeeeelfjfuf
>
fjfhchdejhfhfhfhfhfhf
>
skdkdhfhvnvncnccm
and I would like it to come out in the form


>1...
1,240
Posted By viored
Using awk and/or sed to reconstruct a file
So I have a file in the following format


>*42
abssdfalsdfkjfuf
asdhfskdkdklllllllffl
eiffejcif
>2
dfhucujf
dhfjdkfhskskkkkk
eifjvujf
ddftttyy
yyy
>~
ojcufk
kcdheycjc
djcyfjf
and I...
13,103
Posted By viored
Thanks again, you guys are amazing. And I...
Thanks again, you guys are amazing.

And I tried Guru's code again, and it worked, I don't know why I was seeing empty text files. It also ran significantly faster. Sorry about that, Thanks Guru!!
13,103
Posted By viored
Yoda's code works, Thanks!! ---------- Post...
Yoda's code works, Thanks!!

---------- Post updated at 07:00 PM ---------- Previous update was at 10:57 AM ----------

What if, instead of wanting to output the entire line, I wanted to output...
13,103
Posted By viored
I'm using a UNIX terminal. The code doesn't do...
I'm using a UNIX terminal. The code doesn't do what is requested.
13,103
Posted By viored
This just creates a bunch of empty text files....
This just creates a bunch of empty text files. I'd like those text files to include the information from the original file as indicated in the original post. Thanks.
13,103
Posted By viored
awk script to split file into multiple files based on many columns
So I have a space delimited file that I'd like to split into multiple files based on multiple column values.
This is what my data looks like

1bc9A02 1 10 1000...
Showing results 1 to 14 of 14

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