Search Results

Search: Posts Made By: DJR
7,762
Posted By DJR
How to get variable values back from commands executing remotely via ssh.
So now I can not figure out how to return a value from within this SSH block. So as in the above discussion I can pass parameters from my local machine to the commands running on a remote machine...
7,762
Posted By DJR
Thank you for that MadeinGermany. The first way...
Thank you for that MadeinGermany. The first way didn't work (maybe because I'm using korn shell) but the second one using /bin/sh -s $filepath $filename << 'ENDSSH' did the trick.
7,762
Posted By DJR
Thanks but these don't work. Escaping the...
Thanks but these don't work. Escaping the variables with a backslash does nothing - tried in double quotes also as in \"$var" and either way they are still blank in the SSH block. If I just say
...
7,762
Posted By DJR
How to have local shell variables in a ksh script seen on remove server in SSH block?
I have googled this and found many solutions, but none of them are working for me. I am in a korn shell, most others reference bsh, maybe that is the issue? Anyway, all I am trying to do is use a...
1,260
Posted By DJR
Thank You Corona688. That's exactly what I was...
Thank You Corona688. That's exactly what I was looking for. Works fine now.
1,260
Posted By DJR
Read command restarts at beginning of file
I am reading in a file in a Korn shell script. The file has one header row followed by possibly millions of data rows. I want to do one thing to the header row and write it out to a new output file,...
1,088
Posted By DJR
Thanks. Works perfectly. Took me about half an...
Thanks. Works perfectly. Took me about half an hour looking at AWK tutorials to figure out why, but I think I have it figured out now.
1,088
Posted By DJR
Trying to combine fields with sort/join
I have a file with two fields in it delimited by a comma. Some of the first fields are duplicates. I am trying to eliminate any duplicate records in the first field, and combine the second fields in...
3,291
Posted By DJR
Chubler_XL - Thank you - your solution...
Chubler_XL -

Thank you - your solution works perfectly - does exactly what I need. But I don't understand why. I thought the "export" statement just made a local variable global to where it was...
3,291
Posted By DJR
How to evaluate a variable name on LHS of expression?
I am trying to write a simple function to select values from a database and assign them to variables. It can have any number of arguments sent into it, and I want to assign the value retrieved to a...
3,510
Posted By DJR
logout=/dev/stdout did the trick. That's what I...
logout=/dev/stdout did the trick. That's what I was looking for.

Thanks for your help.

Doug
3,510
Posted By DJR
How do I store stdout in a variable?
These seems ridiculously simple but I can't get it to work. Using korn shell and I want to pass in a flag to tell my echo statements to either write to the screen for debugging or a file if not. So I...
1,062
Posted By DJR
How to keep unix from evaluating a file pattern
How do I keep a file pattern from evaluating?

I want to pass in a file pattern to a script as a parameter, and then use that pattern in subsequent statements, but I can't get the pattern to not...
19,293
Posted By DJR
How to grep for a non-standard ASCII character?
A very simple question but I have scoured the web and can't find an answer. How do I search for a character by ASCII code in a regular expression using grep?

For example, we use the End of Medium...
26,034
Posted By DJR
How to run multiple piped commands in a find -exec statement?
I can't get this to work. Running a single command works fine:
find . -name "*.dat" -exec wc -l '{}' \;

gives me the file name and number of lines in each .dat file in the directory.

But...
1,514
Posted By DJR
Tested now... and it works. Thought I tried...
Tested now... and it works.

Thought I tried that as I tried most every similar combination with no luck. Must have have missed that one.

Thanks for the quick (and correct) response.

DJR
1,514
Posted By DJR
Evaluation syntax in Unix commands
I know this should be simple, but sorry I am fairly new to UNIX and can't find the syntax to make this work.

I have the following two commands in a script:

x=`expr $(head -1 filename.ext |...
Showing results 1 to 17 of 17

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