Search Results

Search: Posts Made By: clx
810
Posted By kamauv234
Thanks a lot @clx perfectly Working !!!
Thanks a lot @clx perfectly Working !!!
2,759
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? ...
1,142
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;...
858
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...
1,013
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,249
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,249
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,606
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,606
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,939
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)...
3,273
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
934
Posted By Scrutinizer
Try using the inverse of the spacing characters: ...
Try using the inverse of the spacing characters:
sed 's/|[^[:blank:]]*//' file
1,711
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
...
976
Posted By radoulov
perl -00e'print sort <>' infile
perl -00e'print sort <>' infile
1,113
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,195
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'...
578
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...
961
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,579
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,853
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,853
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:...
1,460
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...
3,944
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...
2,527
Posted By Scrutinizer
And on Solaris 10 use /usr/xpg4/bin/awk
And on Solaris 10 use /usr/xpg4/bin/awk
902
Posted By Klashxx
Another way: ls *_2010*| sed -e...
Another way:
ls *_2010*| sed -e "p;s/_2010/_2014/"|xargs -n2 mv
Showing results 1 to 25 of 127

 

Featured Tech Videos

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