Search Results

Search: Posts Made By: venky.b5
Forum: What is on Your Mind? 01-03-2017
6,079
Posted By RavinderSingh13
Which category do you belong to?
Hello All,

I was thinking to start this POLL, sometime back but couldn't get time so starting it today. So we all work either as an Admin or as a Developer or as a QA etc. So let's have a...
11,300
Posted By Don Cragun
You could also try: awk...
You could also try:
awk 'BEGIN{d["FP"];d["RFP"]}!($2 in d)' file
As always, if you want to try this on a Solaris/SunOS system, change awk to /usr/xpg4/bin/awk or nawk.
11,300
Posted By RavinderSingh13
Hello Don, Thank you for nice code, I think...
Hello Don,

Thank you for nice code, I think as by typo a "is missed in "RFP".

awk 'BEGIN{d["FP"];d["RFP"]}!($2 in d)' file


Thanks,
R. Singh
4,993
Posted By RudiC
Redirecting to /dev/null is a common method to...
Redirecting to /dev/null is a common method to suppress output. Different from many other entries in /dev, null is read/writeable by "other"s, i.e. anyone on the system.
1,289
Posted By rdrtx1
ps -ef | awk -F"./rello.java" 'NF > 1 && ! /awk/...
ps -ef | awk -F"./rello.java" 'NF > 1 && ! /awk/ {print ($2 ~ /^ *$/) ? $1 FS : $2}'
1,289
Posted By RudiC
Pipe it through awk 'match ($0, /rello.java [^...
Pipe it through
awk 'match ($0, /rello.java [^ ]*/) {print substr ($0, RSTART+11)}'
4,993
Posted By RudiC
The way you issue the ssh command opens an...
The way you issue the ssh command opens an interactive session on the remote host, waiting for your input on stdin. The rest of the script is executed only after you logged out from the host, and the...
5,757
Posted By Aia
Try to place it in $HOME/.cshrc
Try to place it in $HOME/.cshrc
3,570
Posted By jim mcnamara
IN general, doing what you want ,without creating...
IN general, doing what you want ,without creating a chroot jail for that one user, will fail or break existing code for everybody else.

You need to consider - assuming you are on a open source...
3,570
Posted By Don Cragun
In addition to what has already been said by...
In addition to what has already been said by others, the lack of quoting with your expansions of $1 and $@ make it impossible to remove any file with a pathname containing any whitespace characters. ...
3,570
Posted By rbatte1
What would happen if another flag was in argument...
What would happen if another flag was in argument 1, then -rf was argument 2? I feel you would never catch it.

If you are concerned that people may delete files by mistake, you would be better to...
3,570
Posted By RudiC
No way unless you recompile the sources. Anything...
No way unless you recompile the sources. Anything you do on shell level can be circumvented. (I'm not sure if sudo would offer an option to implement this)
3,570
Posted By RavinderSingh13
Hello Venkat, You can either remove the...
Hello Venkat,

You can either remove the execute permission from the rm command but that will restrict other users also from executing the rmcommand. So, you can make bin folder under user's...
1,073
Posted By RudiC
Please use code tags as required by forum rules! ...
Please use code tags as required by forum rules!

As you are using awk anyhow in your solution, why not make the entire action an awk script?
Two thoughts:
- when creating the aliases in the...
1,449
Posted By Don Cragun
Thank you for sharing your results. It will help...
Thank you for sharing your results. It will help other people reading this thread understand how you solved your problem.

For future reference, note that as long as a list of variables are all...
1,449
Posted By Ophiuchus
Thanks MadeInGermany, your're right. I've...
Thanks MadeInGermany, your're right.

I've added the END and print when each block begins and at the END and works now and adding the function as you sugested.

awk '
function prt(){if (NR>1)...
1,449
Posted By MadeInGermany
It prints when E is met. If there is no E nothing...
It prints when E is met. If there is no E nothing is printed.
Instead it must print at the end of each block, that is either when ZYX is met or at the END, and if it's not line 1.
Consider a...
1,007
Posted By RavinderSingh13
Hello nag_sathi, Could you please try...
Hello nag_sathi,

Could you please try following and let me know if you have queries.

for file in abcd.gz.*
do
echo mv $file ${file%\.*}
done
Above will check for all files like abcd.gz.*...
2,175
Posted By RavinderSingh13
Hello Venki, Whenever there is a thread...
Hello Venki,

Whenever there is a thread after top title there is an option named EDIT TAGS. You can click there and then add the specific tags related to any thread, for an example--> solved or...
2,175
Posted By Corona688
The problem is not a different kind of sudo. The...
The problem is not a different kind of sudo. The problem is that sudo is configured differently on some servers than others.

If you want sudo to let that user in passwordlessly for that...
4,036
Posted By Don Cragun
You could also try: awk 'NR>1{printf("%s...
You could also try:
awk 'NR>1{printf("%s ",last)}{last=$0}END{if(NR>0)print last}' input
which should work with zero or more input lines (assuming that if you input file is /dev/null, you don't...
3,270
Posted By neutronscott
both of these read operations work on the same...
both of these read operations work on the same stdin. you need to assign to a different fd and use that for one of them. the easiest way to do this is to ditch the useless use of cat (uuoc award...
2,180
Posted By Aia
ls -lrt | awk '{if(($6 == "Jun") && ($7 == "20"))...
ls -lrt | awk '{if(($6 == "Jun") && ($7 == "20")) print $0}'


Since the default action is print $0 if not specified, that could be shortened as:
ls -lrt | awk '$6=="Jun" && $7=="20"'
which it...
4,683
Posted By Don Cragun
No. Try adding an input line: ...
No. Try adding an input line:
g-xx.freezer.zzzz.fr.worker4
You have to match both periods; not just the first one. But, it would work if you used:
-F'[.]fr[.]'
or
-F'\\.fr\\.' instead of:...
Forum: What is on Your Mind? 06-26-2015
3,971
Posted By rbatte1
printf...
printf "\88\145\154\154\157\40\164\157\40\169\157\165\40\164\157\157\39\12"
Showing results 1 to 25 of 49

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