Search Results

Search: Posts Made By: Don Cragun
242
Posted By Don Cragun
Note that RudiC's and Scrutinizer's suggestions...
Note that RudiC's and Scrutinizer's suggestions both depend on the fact that the orgX and orgXX strings in file2 are distinct. Had file2 also contained the line:
org2=japan
both of those...
Forum: Programming 4 Days Ago
382
Posted By Don Cragun
Was that Solaris 11 on Sparc or on Intel? The...
Was that Solaris 11 on Sparc or on Intel? The results might be different. :)

Could it be that Ubuntu is arranging parameters on the stack based on their sizes? Weird indeed.
200
Posted By Don Cragun
I am very confused. The last line of your...
I am very confused.

The last line of your sample input contains at least 7 fields so the {$1=$1}1 should change colons, underscores, and minus signs to spaces leaving the rest of that line of...
202
Posted By Don Cragun
What have you tried to solve this problem on your...
What have you tried to solve this problem on your own?

Have you looked at any of the threads at the bottom of this page that show other threads that discuss similar topics? Don't any of them meet...
Forum: Programming 4 Days Ago
382
Posted By Don Cragun
The standards don't specify how parameters are...
The standards don't specify how parameters are placed on the stack when a function is invoked and any code that assumes that parameters are placed on the stack in the order given (or in the reverse...
737
Posted By Don Cragun
Unfortunately, the grep -w option is not included...
Unfortunately, the grep -w option is not included in the standards, so it might or might not work on your system. (This is one of the reasons why you should always tell us what operating system...
751
Posted By Don Cragun
You're welcome. Wow! That wasn't at all...
You're welcome.

Wow! That wasn't at all what I was expecting. From your sample data, I thought you were looking for lowercase words create and from at the start of a line of input. But instead...
751
Posted By Don Cragun
I can put thousands of lines on my suggestion. ...
I can put thousands of lines on my suggestion. Is there something in particular that you want the line that you put on my suggestion to do? Or should I just make something up for the fun of it? ...
751
Posted By Don Cragun
Note that if you keep coming to us with requests...
Note that if you keep coming to us with requests for us to write code for you with you not attempting to write any code on your own, we're likely to lose interest in helping you. We are here to help...
Forum: Shell Programming and Scripting 2 Weeks Ago
858
Posted By Don Cragun
You need a lot more than an if statement to do...
You need a lot more than an if statement to do what you want to do. And, if you want our help we will need a lot more information:

What operating system are you using?
What shell are you...
1,376
Posted By Don Cragun
With over a 100 posts in this forum, you know...
With over a 100 posts in this forum, you know that we can't answer that without knowing what operating system you're using and you clearly describing what you are trying to do. If your goal is to...
1,376
Posted By Don Cragun
I am sorry that you don't believe us. Have...
I am sorry that you don't believe us.

Have you looked at the man page for gzip? Does the man page for the version of gzip you are using say anything about it being able to zip multiple files into...
1,376
Posted By Don Cragun
Why is the suggestion posted by vgersh99 in post...
Why is the suggestion posted by vgersh99 in post #9 in this thread not a solution to this problem?
1,027
Posted By Don Cragun
And, for the second time, this duplicate thread...
And, for the second time, this duplicate thread is closed.
1,336
Posted By Don Cragun
Note that using yellow text on a white or gray...
Note that using yellow text on a white or gray background produces text that is almost invisible to an old guy like me with cataracts.

Note that when you ask how a segment of code is going to...
Forum: Shell Programming and Scripting 3 Weeks Ago
1,222
Posted By Don Cragun
One might also try: awk -F, ' NF { for(i = 1;...
One might also try:
awk -F, '
NF { for(i = 1; i < NF; i++) {
printf("| (%s", $1)
for(j = 2; j <= i; j++)
printf("%s%s", FS, $j)
printf(") %s ", $i)
}
print "| " $NF
}' file
This...
1,336
Posted By Don Cragun
I don't have access to a Linux system to test...
I don't have access to a Linux system to test this out, but I would expect the sed command at the end of the pipeline in your command substitution to fail due to a missing search pattern or a missing...
1,395
Posted By Don Cragun
Thanks. It still won't work with ksh88, but...
Thanks.

It still won't work with ksh88, but that will work fine with ksh93.
1,395
Posted By Don Cragun
That is an interesting way to find what we're...
That is an interesting way to find what we're looking for in bash. Looking at the bash man page, it isn't obvious to me why it works.

Unfortunately, it doesn't really work for ksh. It works the...
133
Posted By Don Cragun
Help you with what? What did you try? ...
Help you with what?

What did you try?

What happened?

What isn't working the way you want it to work?

What operating system are you using?

You are using the variables APPLCSF and...
1,395
Posted By Don Cragun
No. It is being run by -ksh as I explained in...
No. It is being run by -ksh as I explained in post #2. What it shows (by the two spaces between "in" and "is" in the output you showed us) is that you didn't set dotscript="myscript.sh" before...
1,336
Posted By Don Cragun
Hi Stefano, What operating system are you...
Hi Stefano,
What operating system are you using?

What version of the date utility are you using?

The command head n- 1 in your pipeline is always going to give you an error unless you have two...
Forum: Homework & Coursework Questions 3 Weeks Ago
1,665
Posted By Don Cragun
Assuming that you have submitted you homework by...
Assuming that you have submitted you homework by now... and expanding a bit on what Corona688 already said...

The command:
env | awk -F= '$1 ~ /(NAME|DIR|PATH)$/{print $1}'
tells awk to read the...
Forum: Shell Programming and Scripting 3 Weeks Ago
1,262
Posted By Don Cragun
What code would you use if you were using...
What code would you use if you were using powershell?

And, what operating system would you be using instead of Linux if you were using powershell? (I can make an educated guess here, but I'd...
Forum: Shell Programming and Scripting 3 Weeks Ago
193
Posted By Don Cragun
Without knowing what operating system(s) those...
Without knowing what operating system(s) those thousand machines are running and what the naming conventions on each of those thousand machines is for user's home directories, there isn't much chance...
Showing results 1 to 25 of 500