Unix/Linux Go Back    

Showing results 1 to 25 of 500
Search took 0.12 seconds.
Search: Posts Made By: Don Cragun
Forum: Shell Programming and Scripting Linux 2 Days Ago
Replies: 1
Views: 176
Posted By Don Cragun
Note that with the quoting you're using on the...

Note that with the quoting you're using on the perl command you're constructing, you won't get the desired results if any of $file, $tok, and $replaceby expand to strings that contain any <space>,...
Forum: AIX Linux 2 Days Ago
Replies: 5
Views: 97
Posted By Don Cragun
I'm confused by what you have shown us. Setting...

I'm confused by what you have shown us.
Setting these locale environment variables in the .profile file of the user itftp will not affect the output you see when you run commands in your shell when...
Forum: AIX Linux 3 Days Ago
Replies: 5
Views: 97
Posted By Don Cragun
It uses a French locale for the definition of...

It uses a French locale for the definition of characters that are to be considered valid when looking at strings, character classes, etc. Setting LC_ALL to any value overrides any values assigned to...
Forum: Shell Programming and Scripting Linux 3 Days Ago
Replies: 3
Views: 388
Posted By Don Cragun
You say that you have a bunch of directories...

You say that you have a bunch of directories several of which contain a file named file1. And you say that you want to be able to give bash's select a list of directories that contain a file named...
Forum: AIX Linux 3 Days Ago
Replies: 5
Views: 97
Posted By Don Cragun
You need to decide whether you want to see...

You need to decide whether you want to see English or French. English locales don't have accented vowels.

You might (or might not) have some luck with:
unset LC_ALL
export LANG=en_US.UTF-8...
Forum: Shell Programming and Scripting Linux 3 Days Ago
Replies: 7
Views: 1,454
Posted By Don Cragun
That is an extremely complicated pipeline that...

That is an extremely complicated pipeline that doesn't seem to be accomplishing a lot of what you want to do. The output you say you want also removes some spaces and hyphens that don't fit with...
Forum: UNIX for Beginners Questions & Answers Linux 3 Days Ago
Replies: 6
Views: 241
Posted By Don Cragun
For at least bash and ksh arrays, you could...

For at least bash and ksh arrays, you could replace your code with:

files_info=( $(find $input_dir -name "*_CHR$i.info" | sort ) )

printf ${#files_info[@]}"\n" #print length
...
Forum: Shell Programming and Scripting Linux 3 Days Ago
Replies: 2
Views: 125
Posted By Don Cragun
Instead of looking for characters that are...

Instead of looking for characters that are special to the shell and individually escaping them, it might be simpler to just quote the argument you're passing to curl:
curl -X GET...
Forum: UNIX for Beginners Questions & Answers Linux 4 Days Ago
Replies: 5
Views: 152
Posted By Don Cragun
Why are you baffled. You have two VERY different...

Why are you baffled. You have two VERY different paths to process:
./apps/scripts/script.sh
is a relative pathname. The code:
pushd "/apps/scripts"
./scripts.sh
popd
is logically equivalent...
Forum: Shell Programming and Scripting Linux 4 Days Ago
Replies: 7
Views: 420
Posted By Don Cragun
In what way does the code RudiC suggested not...

In what way does the code RudiC suggested not work with gawk version 4.2.0?

What diagnostics does it produce when you run it?

Does it produce output, but the wrong output? If so, show us the...
Forum: Shell Programming and Scripting Linux 4 Days Ago
Replies: 10
Views: 304
Posted By Don Cragun
I don't know what: means. I have no idea...

I don't know what:

means. I have no idea why you would want to run two seemingly identical awk programs instead of using A == 1 as a condition for the single action (named content in your...
Forum: Shell Programming and Scripting Linux 5 Days Ago
Replies: 5
Views: 225
Posted By Don Cragun
What operating system are you using? What...

What operating system are you using?

What shell are you using?

When you are in front of your workstation and manually kill process X, please show us exactly what commands do you type into your...
Forum: Shell Programming and Scripting Linux 5 Days Ago
Replies: 5
Views: 225
Posted By Don Cragun
Instead of repeatedly killing process (X); why...

Instead of repeatedly killing process (X); why not just use nice when you start it so it will run at a lower priority and use less system resources when your necessary processes are running at normal...
Forum: Shell Programming and Scripting Linux 5 Days Ago
Replies: 5
Views: 191
Posted By Don Cragun
Using printf isn't a magic bullet here; as RudiC...

Using printf isn't a magic bullet here; as RudiC said in post #2, the way to get rid of the ambiguity between the logical expression CITYCOUNT > 2 and the output redirection > 2 is to use...
Forum: UNIX for Beginners Questions & Answers Linux 6 Days Ago
Replies: 6
Views: 181
Posted By Don Cragun
You could also try: awk -F, 'NF>3' file

You could also try:
awk -F, 'NF>3' file
Forum: UNIX for Beginners Questions & Answers Linux 6 Days Ago
Replies: 6
Views: 181
Posted By Don Cragun
Please re-read the forum rules...

Please re-read the forum rules (https://www.unix.com/misc.php?do=cfrules) you agreed to when you joined this forum. Continued refusal to follow the rules may lead to be placed in read-only mode or...
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 1
Views: 206
Posted By Don Cragun
I know how sftp works. I have no idea what...

I know how sftp works. I have no idea what sosftp is and I have no idea what sosftp_transfer.sh does with its arguments.

It is interesting that both directory names that you pass to that script...
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 7
Views: 302
Posted By Don Cragun
I'm sorry things aren't working out the way you...

I'm sorry things aren't working out the way you want. But I'm confused as to what exactly is going wrong. You say that:
( DISPLAY=:0 xfce4-terminal --command /bin/bash & )
works. You said that...
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 23
Views: 721
Posted By Don Cragun
We still do not have any clear description of...

We still do not have any clear description of what you are trying to do!

We now know that each of your .dat files has the same number of bytes, but we have no idea how to determine where line 19...
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 23
Views: 721
Posted By Don Cragun
Hi Ronald, The definition of the term "Text...

Hi Ronald,
The definition of the term "Text File" in section 3.403 of the Base Definitions Volume of the 2008 revision of the IEEE Std 1003.1 (POSIX standard), The Open Group's Single UNIX...
Forum: UNIX for Beginners Questions & Answers Linux 1 Week Ago
Replies: 3
Views: 152
Posted By Don Cragun
What ? means is: Is what you have so far...

What ? means is:
Is what you have so far working as you expect it to work? If not, in what way is it failing to work?

Are you getting diagnostic messages? (What are they?)
Are files being...
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 23
Views: 721
Posted By Don Cragun
Note that if your *.dat files are not true text...

Note that if your *.dat files are not true text files (i.e., no lines longer than 2048 bytes including the terminating <newline> character, every line is terminated by a <newline> character, and...
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 13
Views: 252
Posted By Don Cragun
Now that the homework question has been answered,...

Now that the homework question has been answered, this thread has been reopened.

See post #7 for an easy solution that works with both ed and ex.
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 13
Views: 252
Posted By Don Cragun
You still haven't said why you can't use ed or ex...

You still haven't said why you can't use ed or ex for this. The following code is much simpler than anything you can do with awk or sed:
ed -s file.txt <<-"EOF"
?START?;/END/p
q
EOF
But, of...
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 13
Views: 252
Posted By Don Cragun
I repeat: Is this a homework assignment? ...

I repeat: Is this a homework assignment?

And, for the third time: Why is sed the only option for this task?
Showing results 1 to 25 of 500

 


All times are GMT -4. The time now is 03:13 AM.