Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: michaelrozar17
1,404
Posted By Corona688
Good news: This is entirely expected and there...
Good news: This is entirely expected and there is no cause for worry at all.

The kernel will use any idle memory for disk cache but gives it up easily at need; you can consider it as "free"...
2,069
Posted By Don Cragun
Removing the g will keep the substitute command...
Removing the g will keep the substitute command from making more than one change on a given line; it will not keep it from changing the 1st occurrence on multiple lines. With the given sample file,...
1,403
Posted By MadeInGermany
@michaelrozarl7: keyboard jamming? Should be ...
@michaelrozarl7: keyboard jamming?
Should be

s/\([^,]*,\)\([^,]*,\)\([^,]*,\)/\1\3\2/
844
Posted By Scrutinizer
In the first sample you use single quotes, in the...
In the first sample you use single quotes, in the second you use double quotes. Because of these $0 is processed as a shell variable, so you would need to escape that $-sign (x=\$0). Or try:
...
20,669
Posted By Scrutinizer
or enter enter an actual <TAB> instead of \t by...
or enter enter an actual <TAB> instead of \t by using CTRL-V <TAB>
1,764
Posted By Scrutinizer
@ michael: the double quotes on the RHS of the...
@ michael: the double quotes on the RHS of the expression should be removed at any case otherwise the characters will be interpreted as string. Also, the RHS will not be evaluated using regex but by...
1,764
Posted By ygemici
check these if [[ $answer !=...
check these
if [[ $answer != [a-zA-Z]*[a-zA-Z0-9_-] ]]; then echo ok; fi
ok


from the bash manual it says for [[ expression ]]
Any part of the pattern may be quoted to force it to be matched...
5,181
Posted By radoulov
Consider the following: % awk --version |...
Consider the following:

% awk --version | head -1;printf '%s\n' a--b-c | awk 'END { print NR } 1' RS=--
GNU Awk 4.0.0
a
b-c

2


$ uname -sr; printf '%s\n' a--b-c | nawk 'END { print NR }...
9,750
Posted By methyl
Yes the output from "df -k" is in kilobytes. ...
Yes the output from "df -k" is in kilobytes.

You will often get small differences between the figures for "du" and "df" due to sparse files and open files. Apart from being quicker, "df" is more...
1,736
Posted By radoulov
You need one more backslash with the old command...
You need one more backslash with the old command substitution command:

export a=`awk -F'\\\^A' '{ print $1 }' file1.sh`

But, of course, you should use the new one $( ... ), if your shell...
9,291
Posted By Corona688
When printing error messages. Yes, it does. Do...
When printing error messages. Yes, it does. Do you want error messages ending up anywhere but the console? Usually not. You don't want them in whatever data you're saving from the process, which...
981
Posted By Scrutinizer
The process is not part of the LHS. These...
The process is not part of the LHS. These operators are used to open/close files. If for instance I do this:
cat < infileit is implicit notation for this:
cat 0< infileSo in fact the left hand side...
6,111
Posted By jlliagre
for i in 1 $(seq 200 200 10000) do echo $i ...
for i in 1 $(seq 200 200 10000)
do
echo $i
done Note that your first step is 199, not 200 so need to be specified separately.
18,212
Posted By clx
Setting FS to "," on those lines which doesn't...
Setting FS to "," on those lines which doesn't contains the "," means that the whole line will be considered as $1 ( first field ) so $1 and $0 would be same in that case.

This never means that...
1,670
Posted By Scott
Hi. You have the closing backtick in the...
Hi.

You have the closing backtick in the wrong place, and the echo is not required...

dte=`echo ls -ltr` | tail -1 | awk '{print $6 $7}' | date +%Y%m%d
Should be:

dte=`ls -ltr | tail -1 |...
Showing results 1 to 15 of 15

 

Featured Tech Videos

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