Search Results

Search: Posts Made By: daWonderer
3,768
Posted By rangarasan
awk
Hi,

You have some syntax errors, we wont use '$' prefix for variables unless thats a system variable in awk(like $0,$1...).


for (i=0; i< ${#TATAMSC[@]}; i++ ) if(substr($1,184,4)=...
2,802
Posted By methyl
The shutdown command is machine-specific. They...
The shutdown command is machine-specific. They usually use thewall command.
man wall
man write
The messages from wall or write still mess up the display on the receiving terminals.

We use email...
2,802
Posted By methyl
To answer the question in post #1. It is not...
To answer the question in post #1.
It is not possible for a background task to type input on the foreground keyboard.
It is not normal to create a background process which outputs to a terminal -...
1,486
Posted By vbe
What's happend to the "/tmp/" before af.out...
What's happend to the "/tmp/" before af.out ?
3,187
Posted By admin_xor
Please note that while posting, you might want to...
Please note that while posting, you might want to post your environment like the U*IX variant you are using and also the shell you are using.

Assuming, you are using POSIX compliant shell like...
2,531
Posted By methyl
You don't. It is not needed or desirable to put...
You don't. It is not needed or desirable to put the command into an Environment Variable (like $cmd in your script).
Your whole script should be just:

#!/bin/bash
cd /
find . -type f -name...
Forum: IP Networking 03-02-2012
2,404
Posted By Corona688
A smart DHCP client is paranoid and doesn't trust...
A smart DHCP client is paranoid and doesn't trust the values its given. It checks if they're occupied, first. (run dhcpcd manually, it'll even tell you it's doing so...)

Which is why a process...
1,226
Posted By Corona688
Usually it doesn't, it just fills in filenames or...
Usually it doesn't, it just fills in filenames or command names.

You can find it in man bash under 'Programmable Completion', but looks very complex.

A more hands-on tutorial is here...
4,193
Posted By rangarasan
awk
Hi,

Try this one with your new requirement.

You have to store the below code in check.awk file.

check.awk

#! /usr/bin/awk
{
f1[$3]=1;
f2[$2]=1;
if(chk1[$1]...
4,758
Posted By vbe
Truly I find that stupid... If you were to...
Truly I find that stupid...
If you were to limit root access (very good, we all do that...) start by allowing root connection to console only ( Yes only one! ), then users entitled to use root...
2,367
Posted By michaelrozar17
Giving double square brackets is not wrong, the...
Giving double square brackets is not wrong, the if statement would do the regular test. For more information read link1 (https://www.unix.com/302076732-post.html#post302076732)and link2...
4,193
Posted By rangarasan
awk
Hi,

Try this one,


awk '{f1[$3]++;f2[$2]++;a[$3"^"$2]++;}END{ORS="";print " ";for(j in f2){print j" ";c++;if(c>5){print " ";}}print "\n";for(i in f1){print i;for(k in...
Forum: IP Networking 02-27-2012
1,653
Posted By spynappels
You've added a route without specifying a gateway...
You've added a route without specifying a gateway for it. For the route to work, you'd need to add a gateway parameter too using the gw switch. Also you've set a class C address up as a Class B one,...
Forum: Ubuntu 02-25-2012
14,582
Posted By admin_xor
-i option in sudo acts similar to "su - username"...
-i option in sudo acts similar to "su - username" or login. It changes the environment to that of the user in question. So the UID and EUID will be that of the user you are trying to sudo to...
Forum: Ubuntu 02-25-2012
14,582
Posted By admin_xor
Looks like you have some kind of problem there. I...
Looks like you have some kind of problem there. I tested this fully on my RHEL 6.2 box. It's working perfectly. Copying /usr/bin/passwd to another directory and executing does not even work in my...
Forum: Ubuntu 02-24-2012
14,582
Posted By explorer007
Restrict SUDO Access
Linux ubuntu 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
Hi Folks,

Please help me. I am bit struck here.

Here is the OS info.
Linux ubuntu...
1,784
Posted By Scrutinizer
exec "$cmd"
exec "$cmd"
7,237
Posted By Corona688
sysctl doesn't have a giant list of everything...
sysctl doesn't have a giant list of everything it's allowed to change in the kernel. All it does is trawl the entire /proc/sys folder looking for things to print.

That item in particular:

$ ls...
2,644
Posted By m_usmanayub
[Solved] Extract records based on a repeated column value
Hi guys,

I need help in making a command to find some data.

I have multiple files in which multiple records are present.. Each record is separated with a carriage return and in each record...
1,015
Posted By Scrutinizer
Yes but the lines that ls -l produces do not...
Yes but the lines that ls -l produces do not start with 'u'
4,202
Posted By alister
Some errors noted upon casual inspection: ...
Some errors noted upon casual inspection:

find is missing the path argument. The pattern argument to the -name primary must be protected from shell expansion.

Also, there's a colon where a...
38,525
Posted By ctsgnb
echo "abc" | tr '[:lower:]' '[:upper:]' ABC ...
echo "abc" | tr '[:lower:]' '[:upper:]'
ABC

But the best solution in my opinion is still to use the "typeset -u" way mentionned in my first post
38,525
Posted By itkamaraj
$ echo "abc" | awk '{print toupper($0)}' ...
$ echo "abc" | awk '{print toupper($0)}'
ABC
22,181
Posted By agama
Does this do it for you: ps -elf|sort -k...
Does this do it for you:


ps -elf|sort -k 4nr,4


The S means that it is interruptible (waiting for an event to complete). The ps man page probably lists all of them.
11,118
Posted By Scrutinizer
Hi Vijay, this is called parameter expansion...
Hi Vijay, this is called parameter expansion (http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02).
Showing results 1 to 25 of 28

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