Search Results

Search: Posts Made By: Cactus Jack
5,464
Posted By Cactus Jack
Can you a give a permutation for one that can be...
Can you a give a permutation for one that can be put in a test command?

I was hoping to manipulate them so they both are identical.

E.g. sort characters in order

string1=dorw
string2=dorw...
5,464
Posted By Cactus Jack
sorry I meant identical. This is for the purposes...
sorry I meant identical. This is for the purposes of a test. The strings are already very similar. They only differ in the way of content by order. I want to run a command(s) on them so that they...
5,464
Posted By Cactus Jack
string manipulation
Hi, I have searched this long and hard and don't seem to see another post on this issue.
I have two strings each with the same characters but in a different order.

String1=”word”
String2=”dwor”...
1,903
Posted By Cactus Jack
Hi I have resolved the issue. C.J
Hi I have resolved the issue.

C.J
1,903
Posted By Cactus Jack
eval problem.. advice needed!
Hi I need some major help with eval

I have a statement using eval:

read input
eval variable$input=”something”

Now I want to use the “variable$input” in some commands but I don't know how to...
9,952
Posted By Cactus Jack
Ah I wasn't sure what you meant by "parameters...
Ah I wasn't sure what you meant by "parameters 2-d" but your example illustrated it perfectly :b:. My hats off to you.. that one is definitely going in my private notes :cool:. Thanks a lot

CJ
9,952
Posted By Cactus Jack
Hi guys thanks for the help.. I think I have...
Hi guys thanks for the help.. I think I have sorted it now using a pattern matching condition which looks for " " (spaces) and if any are present from the user input, an error is returned and the...
9,952
Posted By Cactus Jack
Thanks kpearson, I think I see the problem. The...
Thanks kpearson, I think I see the problem. The thing is as I am in effect opening a file from read variable so that I can work my program on it, I can't modify variable because my program won't be...
9,952
Posted By Cactus Jack
Hello sorry for the confusion. My program script...
Hello sorry for the confusion. My program script basically takes in a file and performs actions on it. The main function of the program takes in the filename and a few other variables. The program...
9,952
Posted By Cactus Jack
oops good spot there.. the if [ $# - gt 1 ] error...
oops good spot there.. the if [ $# - gt 1 ] error is now gone but it still doesn't work.

When I enter "one two" in the command line the condition does not get caught by if [ $# -gt 1 ] and I get...
9,952
Posted By Cactus Jack
Hi guys still no joy on this issue. It appears...
Hi guys still no joy on this issue. It appears that anything with an integer test condition does not work. E.g.

if [ $# - gt 1 ]
then echo "Single filename argument expected"
exit 1...
9,952
Posted By Cactus Jack
Thanks for the help. I have tried what fpmurphy...
Thanks for the help. I have tried what fpmurphy has written (excluding the regular file test) but every time I enter a valid filename of a file that exists, I keep getting the "Exiting. No filename...
9,952
Posted By Cactus Jack
Thanks for the help guys.. after viewing the man...
Thanks for the help guys.. after viewing the man "test", I have come up with this:

if test -z $file -o ! -a $file

the -z bit is for when the user simply hits return and doesn't enter anything...
9,952
Posted By Cactus Jack
Opening Files as command line arguments
Hi have set a command line argument where the user enters the filename.

I have set a condition that if the command line is null (user just enters return), the script will exit (with an error...
3,753
Posted By Cactus Jack
Hi Perderabo, I can't use Awk or Sed (thats for...
Hi Perderabo, I can't use Awk or Sed (thats for later on in my course). I have found a solution using nl but I want do take the long route on this one and use the shell programming techniques I have...
3,753
Posted By Cactus Jack
how to number format a data file without using SED?
Hi I have a file which contains data (list of data) and I want to put a number with bracket 1) 2) 3) etc at the beginning of every successive line

I can do it with SED and I can also do it using...
Showing results 1 to 16 of 16

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