Search Results

Search: Posts Made By: john_prince
2,886
Posted By RudiC
Try awk ' function PRT() {if (!HDDONE) ...
Try
awk '
function PRT() {if (!HDDONE) {printf "TimeStamp"
for (i=1; i<=MXSV; i++)
for (j=2; j<=MXHD; j++) printf...
1,834
Posted By spacebar
These are are a couple of examples: $ cat t ...
These are are a couple of examples:
$ cat t
BIND dn="uid=

** Perl example
$ perl -ne '/BIND dn=\"uid=/ && print' t
BIND dn="uid=

** sed example
$ sed -n '/BIND dn\="uid\=/p' t
BIND...
1,834
Posted By bartus11
Try without "\s":/BIND dn="uid=/
Try without "\s":/BIND dn="uid=/
2,130
Posted By Chirel
Hi, just add ;; a the end of the line with error.
Hi, just add ;; a the end of the line with error.
2,097
Posted By vgersh99
nawk -F:...
nawk -F: 'BEGIN{fmt="%-50s%-40s%-10s%-20s\n";printf(fmt,"Path","Attribute","Value","myNewField")}tolower($1)~"nsslapd-accesslog*" {printf(fmt,FILENAME,$1,$2,$3)}' ...
1,755
Posted By rdcwayx
cut -d@ -f2 < infile
cut -d@ -f2 < infile
1,755
Posted By maya_style
easy
awk -F"@" '{ print $2 }' arhive.txt
4,454
Posted By methyl
grep -i "abc" filename.txt ; REPLY=$? if [...
grep -i "abc" filename.txt ; REPLY=$?
if [ ${REPLY} -eq 0 ]
then
echo "Found abc in filename.txt"
else
echo "Did not find abc in filename.txt"
fi
On most versions of "grep"...
4,454
Posted By methyl
(Possibly controversial post, it's getting late...
(Possibly controversial post, it's getting late here).

What is the problem with just putting the entire command into a shell script? To my mind all the variables and eval are not needed because...
1,623
Posted By kshji
No. eval commandline eval $lgrep $ED_CMD
No.
eval commandline
eval $lgrep $ED_CMD
12,075
Posted By dsw
Hi John, Please see my earlier post,...
Hi John,

Please see my earlier post, specifically:



I suggest you request that your Sysadmin "does the needful", because sudo will consume arguments passed and check whether they correspond...
1,731
Posted By Scrutinizer
Have a look here: Shell Command Language:AND...
Have a look here:
Shell Command Language:AND lists (http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03_06)
2,279
Posted By ctsgnb
Feel free to replace the echo $LINENO by your...
Feel free to replace the echo $LINENO by your task1 task2 task3 ...

# cat -n mtst
1 ask(){
2 echo "Do you want to continue y/[n]?"
3 read a
4 case $a...
2,279
Posted By simusphere
You mean like the pause command in windows batch...
You mean like the pause command in windows batch files?

Check Howto add pause prompt in a shell script ( bash pause command ) (http://www.cyberciti.biz/tips/linux-unix-pause-command.html)
2,136
Posted By m.d.ludwig
If you are running on a linux based OS, date...
If you are running on a linux based OS, date supports relative times, as in:
trogdor $ date
Mon Jan 17 15:08:38 EST 2011
trogdor $ date -d '4 hours ago' '+%d/%b/%Y:%H'
17/Jan/2011:11If your...
2,281
Posted By anurag.singh
printf("%s:%02d\n",$1,$2-4) 1st argument to...
printf("%s:%02d\n",$1,$2-4)

1st argument to printf is the format. %s to print $1 as string, %d is to print as integer where 02 is to padd ZERO on left if ($2-4) width is less than 2.
For more...
2,639
Posted By Franklin52
Can you post a better example of your input file...
Can you post a better example of your input file and the desired output?
Showing results 1 to 17 of 17

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