Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: clx
695
Posted By kamauv234
Thanks a lot @clx perfectly Working !!!
Thanks a lot @clx perfectly Working !!!
2,479
Posted By Don Cragun
Your requirements are not at all clear. ...
Your requirements are not at all clear.

What constitutes a file?
How are instances of a file determined?
How are the latest instances of a file determined? (By name? By timestamp? ...
977
Posted By RudiC
Any ideas/thoughts/attempts from your side? ...
Any ideas/thoughts/attempts from your side?

---------- Post updated at 12:31 ---------- Previous update was at 12:30 ----------

Howsowever, try while read FN1; do read FN2; echo mv $FN1 $FN2;...
797
Posted By Don Cragun
While being a member of the UNIX & Linux Forums...
While being a member of the UNIX & Linux Forums for a little bit over six months, this thread's submitter has accumulated fourteen infractions for non-descriptive thread titles, failure to use CODE...
928
Posted By jim mcnamara
Thanks for the answer. Note to others reading...
Thanks for the answer. Note to others reading this post: The ${PIPESTATUS[0]} is an arra6y of return code for each process in a pipe - a bash shell builtin.
2,062
Posted By Don Cragun
First: The tags to use to surround bold text are ...
First: The tags to use to surround bold text are and without the asterisks.

Second: When you are creating a post, hit the Go Advanced button, and you get more formatting tools at the top of the...
2,062
Posted By Scott
It has nothing to do with BBCode, but with how...
It has nothing to do with BBCode, but with how browsers turn <textarea>'s into rich-text areas that render text like a word processor would. Then, when refreshed vB would interpret that "rich text"...
2,368
Posted By Don Cragun
Yes, it is shell specific and version specific. ...
Yes, it is shell specific and version specific.

You still haven't told us what shell you're using... although it is some version of bash from the diagnostics.

It is in ksh version 93u+...
2,368
Posted By fpmurphy
It is valid syntax for Bash str="Hello" $...
It is valid syntax for Bash

str="Hello"
$ str+=" "
$ str+="World"
$ echo $str
Hello World
$

Also works in the Korn shell
5,627
Posted By MadeInGermany
Tip: alternative for NR==FNR in awk
Example:
$ cat file1
2
3$ cat file2
1
2
3
4
5
6The following awk script works like a charm, NR==FNR is true for file1, the remainder runs for file2:
awk '
NR==FNR {A[$1]; next}
($1 in A)...
2,926
Posted By Makarand Dodmis
He wants all line below pattern "file3" by your...
He wants all line below pattern "file3" by your code it is displaying "file3" as well
862
Posted By Scrutinizer
Try using the inverse of the spacing characters: ...
Try using the inverse of the spacing characters:
sed 's/|[^[:blank:]]*//' file
1,547
Posted By Scrutinizer
server="icapp1 icapp6 ihapp1 ihapp6 icapp2 icapp3...
server="icapp1 icapp6 ihapp1 ihapp6 icapp2 icapp3 icapp4 ihapp2 ihapp3 ihapp4 icapp5 ihapp5 "
for i in $server
do
if [ "$i" = "$input" ]; then
echo hello
fi
done

case $server in
...
898
Posted By radoulov
perl -00e'print sort <>' infile
perl -00e'print sort <>' infile
958
Posted By Kibou
I just tried rename as you posted to check it and...
I just tried rename as you posted to check it and it didn't do anything. So I changed to this,

rename 's/product_host_result/output_product_host/' product_host_result*.txt

and this worked to...
2,077
Posted By pilnet101
The above post has a few bugs (i.e. Description...
The above post has a few bugs (i.e. Description variable will not show).

This is messy and probably can be condensed a lot, but it was fun to create :D. Hope it helps:

awk 'BEGIN{ORS=" "}1'...
12,247
Posted By MadeInGermany
Rule of thumb: if there are more than 100 threads...
Rule of thumb: if there are more than 100 threads per process, then the Java process is badly programmed - talk to the application owner/vendor.
If there are more than 1000 threads per process,...
520
Posted By Kibou
May I try to explain it? awk -F"[,;]" -> You...
May I try to explain it?

awk -F"[,;]" -> You are telling to awk what you want awk to consider what is going to be the Field Separator (FS). You have to tell awk what is going to be the Field...
893
Posted By Scrutinizer
Different approach: awk '{n=$1; $1=p FS n-p FS;...
Different approach:
awk '{n=$1; $1=p FS n-p FS; $(n-p+1)=x; p=n}NR>1 END{print p}' OFS=N file
1,435
Posted By Don Cragun
Since you didn't use CODE tags when you posted...
Since you didn't use CODE tags when you posted your question, clx couldn't tell that the lines containing module do not have that text at the beginning of the line.

Now that I've added CODE tags...
1,716
Posted By Don Cragun
Hi clx, I agree that the documentation on the...
Hi clx,
I agree that the documentation on the ksh printf %T format specifier is subpar. Through trial and error, I have found that the argument specifying the date and time can be formatted at...
1,716
Posted By Don Cragun
If you don't have access to the GNU utilities...
If you don't have access to the GNU utilities version of the date utility, but you have a recent 1993 version of the Korn shell (such as the one on the last few releases of Mac OS X), you could use:...
3,547
Posted By Scrutinizer
@azherkn3. Please: Answer the...
@azherkn3.

Please:

Answer the questions put forward by various posters in this thread.
Comment on why the solutions given in this thread are not working for you.
Be very specific about...
1,269
Posted By Neo
It's nearly always best to use the absolute path...
It's nearly always best to use the absolute path name in scripts, for all filenames, including commands.

First of all, if you don't use a full path, then it's possible another file can be executed...
2,091
Posted By Scrutinizer
And on Solaris 10 use /usr/xpg4/bin/awk
And on Solaris 10 use /usr/xpg4/bin/awk
Showing results 1 to 25 of 127

 

Featured Tech Videos

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