Search Results

Search: Posts Made By: Arun_Linux
1,134
Posted By Akshay Hegde
fruits="apple grape orange jack lemon" echo...
fruits="apple grape orange jack lemon"
echo $fruits | awk '{ for ( n=1; n<=NF; n++ ) if($n == my_string) print $(n+1) }' my_string="orange"
jack


---------- Post updated at 06:25 PM ----------...
2,264
Posted By wisecracker
You only have to search the forums and VOILA! ...
You only have to search the forums and VOILA!

Bash Inkey Function (https://www.unix.com/unix-dummies-questions-answers/219287-bash-inkey-function.html)
2,264
Posted By Corona688
#!/usr/bin/bash touch /tmp/$$ ( while [...
#!/usr/bin/bash

touch /tmp/$$

( while [ -f /tmp/$$ ]
do
sleep 1
done ) &

while read -n 1 INPUT
do
case "$INPUT" in
A) echo "You typed A"
;;
Q) echo "quitting"...
1,664
Posted By pamu
Use /usr/xpg4/bin/awk or nawk on Solaris.
Use /usr/xpg4/bin/awk or nawk on Solaris.
13,901
Posted By Scrutinizer
If you run it on the command line, you are...
If you run it on the command line, you are running it directly in the parent shell, so there are no foreground process groups that listen to ctrl-c, except for the "sleep"-command , so each time...
1,320
Posted By vpundit
little odd questions but i can try and answer a...
little odd questions but i can try and answer a few of them.

because unix/linux is mostly command based your files will mostly be text based. this is why when you do a cat more vi <file> you are...
Forum: What is on Your Mind? 08-14-2012
3,035
Posted By Neo
Yes, of course it is a great choice. There...
Yes, of course it is a great choice.

There are many strong commercial software companies out there who give priority to hiring programmers who have strong references from free or open source...
Forum: Solaris 08-02-2012
5,308
Posted By RudiC
id -u (if available on your machine) might save...
id -u (if available on your machine) might save you all the cutting...
Forum: Solaris 08-02-2012
5,308
Posted By in2nix4life
This might help. It's a bit long-winded, but...
This might help. It's a bit long-winded, but could accomplish what you want by adding a test in the alias command:


alias rm="[ $(id | cut -d'=' -f2 | cut -d'(' -f1) -ne 0 ] && rm -i"


So if...
Forum: Solaris 08-02-2012
5,308
Posted By Corona688
No, they don't, actually. Aliases apply to...
No, they don't, actually. Aliases apply to interactive logins, only interactive logins, and nothing but interactive logins.

If you type 'rm' directly into a root terminal where rm is aliased to...
Forum: Web Development 06-30-2012
3,500
Posted By figaro
You can edit the php code any way you like, but...
You can edit the php code any way you like, but with a CMS you are more likely to design pages and add content, rather than programming, simply because CMSes are designed to be out of the box...
Forum: Web Development 06-28-2012
3,500
Posted By Neo
Wordpress (WP) is not listed in the link posted...
Wordpress (WP) is not listed in the link posted above (for some reason):

WordPress - Wikipedia, the free encyclopedia (http://en.wikipedia.org/wiki/WordPress)

I'm a big fan of WP for novice web...
12,277
Posted By itkamaraj
Perl: How to get IO::Socket::INET timeout after X...
Perl: How to get IO::Socket::INET timeout after X seconds? - Stack Overflow (http://stackoverflow.com/questions/3570440/perl-how-to-get-iosocketinet-timeout-after-x-seconds)
5,870
Posted By ygemici
# echo "$my_hex_stream"|awk --non-decimal-data...
# echo "$my_hex_stream"|awk --non-decimal-data '{for(i=1;i<NF-1;i+=2){A=sprintf("%0d,","0x"$i$(i+1));print A}A=sprintf("%0d","0x"$(NF-1)$NF);print A
}' FS= ORS=
12,7,172,20,0,22,118
5,870
Posted By Skrynesaver
The following works: perl -e ' ...
The following works:

perl -e '
$hex="0c07ac14001676";
while($hex=~/(..)/g){
push @values, $1;
};
for (@values){
$_=hex($_);
}
print join(",",@values),"\n";'
12,7,172,20,0,22,118
Forum: IP Networking 03-21-2012
2,827
Posted By Corona688
Each end of the connection has its own port. ...
Each end of the connection has its own port. You're connecting to port 80 on google, but your own port is going to be a random number >32768. Let's call it 40,000.

So your PC transmits a...
2,832
Posted By rangarasan
tee
Hi,

Try this one,


date | tee -a file


tee cmd will redirect the output to file and as well as STDOUT.

Cheers,
Ranga:)
2,832
Posted By methyl
date | tee file See "man tee" and also take...
date | tee file
See "man tee" and also take note of the "-a" option.
Forum: Web Development 02-17-2012
7,031
Posted By DGPickett
It is simplest if the first CGI generates a FORM...
It is simplest if the first CGI generates a FORM that POST's with HIDDEN variables to the second CGI. (BTW, put the HIDDEN variables right after FORM so they are not dropped. I made an HTML page...
Showing results 1 to 19 of 19

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