Search Results

Search: Posts Made By: mohtashims
316
Posted By MadeInGermany
As I suggested, have -name "*.js?*" \! -name...
As I suggested, have -name "*.js?*" \! -name "*.jsp" or cheat with -name "*.js??*".
And most easy is of course -name "*.jsp?*".
785
Posted By RudiC
[^[:blank:]#;] # ONE char non-blank,...
[^[:blank:]#;] # ONE char non-blank, non-#, non-;
785
Posted By RudiC
Don't worry, your overcomplicated regex doesn't...
Don't worry, your overcomplicated regex doesn't match anything reasonable in your file, if that is what you're after (not clear from your spec). Even uncommented lines with # removed (which I added...
1,129
Posted By RudiC
Difficult to believe. How long would a string...
Difficult to believe. How long would a string need to be to buffalo awk?


What would that be, "non seek"?


How about
declare -A IPASS
IFS=,
for i in $iplist; do IPASS[$i]=${#IPASS[@]}; ...
1,129
Posted By Neo
Dear mohtashims, [reply before original...
Dear mohtashims,

[reply before original post edited]

With nearly 1000 posts on this site; you well know the culture here by this time.

You should post your code, what you have tried.

As...
953
Posted By RudiC
The ssh daemon is relevant on the target server....
The ssh daemon is relevant on the target server. Compare e.g. ssh.conf.
953
Posted By RudiC
Well - compare configurations and report back,...
Well - compare configurations and report back, that is...
1,109
Posted By nezabudka
Hi just add option echo -e $str1 > text.txt
Hi
just add option
echo -e $str1 > text.txt
1,109
Posted By Aia
echo $str1 | sed 's/\\n/\n/g' > text.txt
echo $str1 | sed 's/\\n/\n/g' > text.txt
1,087
Posted By nezabudka
egrep -o '(\S+\s+){2}\S+' <<<"$1" | awk ' ...
egrep -o '(\S+\s+){2}\S+' <<<"$1" |
awk '
{A[$1]; B[$3]; C[$2]}
END { print "TKT:" cat(A) "\n\nDEPT:" cat(B) "\n\nACTOR:" cat(C)}
function cat(T)
{ s=""; for (i in T)
...
Forum: Linux 12-23-2019
3,435
Posted By Neo
Yes, you did everyone correctly. Let me...
Yes, you did everyone correctly.

Let me think about it and get back to you later.

Thanks.
1,739
Posted By MadeInGermany
The shorter pathnames is a small improvement only...
The shorter pathnames is a small improvement only when post processing the output.
Then, you can bundle the names (shortens the command, not so much the run time).
But a + instead of the \; will...
1,844
Posted By Scrutinizer
Ah so it is the other way around? The hostname is...
Ah so it is the other way around? The hostname is always lowercase, but the path may be uppercase?

Try something like:
cd $(ls -d "$(hostname)"* "$(hostname | tr '[[:lower:]]' '[[:upper:]]')"*...
2,610
Posted By RudiC
There seems to be a mixup between shell globs and...
There seems to be a mixup between shell globs and grep / regex patterns. Try grep 'body.*.xml'.


Or, recent bashes provide "extended pattern matching" if the extglob shell option is set:
shopt...
3,232
Posted By Corona688
If your values will never contain spaces, you can...
If your values will never contain spaces, you can "pass" arrays as strings "val1 val2 val3" and split them back inside the function, like this:

#!/bin/ksh

set -A filelist val1 val2 val3
set -A...
2,902
Posted By apmcd47
I was going to say I agree with RudiC, but...
I was going to say I agree with RudiC, but realise $LINE should be a subset of $1, not the other way round, so Rudi's solution probably won't get the results you want. So let's look at what is wrong...
2,916
Posted By MadeInGermany
grep for items ending with a : grep ':$' The...
grep for items ending with a :
grep ':$'
The $ indicates the line end.
But doesn't the -p option let the ls command add a / to the end of directory names?
Then grep -v '/$' or grep '[^/]$' can...
2,466
Posted By MadeInGermany
ksh does not have the <<< (here string) operator....
ksh does not have the <<< (here string) operator. (An exception are few variants of ksh93.)
In ksh you can do
echo "$var" |
while IFS= read -r dirpath
do
echo "Hi"
done
Note that ksh,...
2,835
Posted By Chubler_XL
I believe perl is available on default AIX...
I believe perl is available on default AIX installations so this could be used to fetch the file modification time eg:

perl -e 'use POSIX qw(strftime);use File::stat; print strftime($ARGV[0],...
2,835
Posted By MadeInGermany
Try the following echo "$(find...
Try the following
echo "$(find /app/logs/fname1.out -ls) $(cksum<fname1.out | cut -d' ' -f1)"
Too much information? Pipe the find output to cut and select the desired fields! (Like you do with the...
1,434
Posted By Neo
Maybe it's because you do not understand...
Maybe it's because you do not understand computers and the basics on how to use them?

For example, if you understood computers, you would tell us exactly what computer use are using and any error...
2,460
Posted By MadeInGermany
The echo command is not portable. Use printf...
The echo command is not portable.
Use printf "%s\n" instead.
cat check.sh
str=`printf "%s\n" "$1" | sed -e 's#\\\\n# #g'`
printf "%s\n" "$str"
str=$(printf "%s\n" "$1" | sed -e 's#\\\\n# #g')...
2,481
Posted By anbu23
$ echo '/fin/app/scripts\\n/fin/app/01/sql' | sed...
$ echo '/fin/app/scripts\\n/fin/app/01/sql' | sed -e 's#\\\\n# #g';
/fin/app/scripts /fin/app/01/sql
$ echo '/fin/app/scripts\\n/fin/app/01/sql' > file
$ sed -e 's#\\\\n# #g' file...
2,184
Posted By rdrtx1
deleted.
deleted.
2,249
Posted By Chubler_XL
yes use %h/%f instead of %f: find...
yes use %h/%f instead of %f:

find /app/logs/fname1.out -printf "%M %u %TY-%Tm-%Td %TH:%TM %h/%f $(cksum<fname1.out | cut -d' ' -f1)\n"
Showing results 1 to 25 of 256

 

Featured Tech Videos

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