Originally posted by DaveB
View Post
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
An Interview with the Indians
Collapse
X
-
-
Originally posted by scotspine View Postah, a mac person. how quaint
how was the hook-dipping this year oh?Comment
-
Originally posted by DaveB View Postthe ECHO command is the same between Windows and UNIX. It sends it's argument to the standard output. ( The command line usually ).
The confusion here is with the way UNIX handles variables. To define a variable and send it to the standard output in unix you use
> foo=bar
> ECHO $foo
> bar
The trick with ECHO $$ is that Unix has a number of predetermined variables, set at shell and environment level that contain specific pieces of infomation.
$ is the variable name used to identify the ID of the currently running process. So 'ECHO $$' will return the current value of $. Others include :
- $1 - $9 these variables are the positional parameters.
- $0 the name of the command currently being executed.
- $# the number of positional arguments given to this
- invocation of the shell.
- $? the exit status of the last command executed is
- given as a decimal string. When a command
- completes successfully, it returns the exit status
- of 0 (zero), otherwise it returns a non-zero exit
- status.
- $$ the process number of this shell - useful for
- including in filenames, to make them unique.
- $! the process id of the last command run in
- the background.
- $- the current options supplied to this invocation
- of the shell.
- $* a string containing all the arguments to the
- shell, starting at $1.
- $@ same as above, except when quoted.
It's all further complicated by the distinction between SHELL and ENVIRONMENT variables ( SHELL variables only apply to the current shell, ENVIRONMENT variables apply to all Shells ) and the fact that a single user can run multiple shells all with different variables defined, at the same time, and switch between them at will.
Originally posted by DaveB View PostYour turn now ZG. What is a NIXIE tube and why on earth would anyone eant to use them in a watch?
A nixie tube is a long obsolete display technology invented in the 1950s.
It uses neon gas at low pressure in a thing that looks like a valve to display the numbers 0 to 9.
These are now rather popular for making clock displays. Probably because they're expensive.
As to why you'd want two in your wrist watch, I'm afraid it's beyond me.
Must take a lot of batteries to keep it going.Comment
- $1 - $9 these variables are the positional parameters.
-
that's all well and good talking about apples and indians and cars and whatnot but what we really want, nay NEED to know, is what AtW has had for lunch and what s the latest SKA news?The proud owner of 125 Xeno Geek PointsComment
-
-
We'll have to wait 366 days - he's gone silent hasn't he?Bazza gets caught
Socrates - "The only true wisdom is in knowing you know nothing."
CUK University Challenge Champions 2010Comment
-
but.. but ... what about SKA? and lunch reports? and all that opinionated knowledge.. I truly hope he comes back soon and tells us his thoughts, life is just not the same without the squirrel loving ruskie around..The proud owner of 125 Xeno Geek PointsComment
-
Originally posted by thunderlizard View PostCode:Microsoft Windows [Version 6.0.6002] Copyright (c) 2006 Microsoft Corporation. All rights reserved. c:\>echo $$ $$
Code:GNU bash, version 3.2.17(1)-release (powerpc-apple-darwin9.0) Copyright (C) 2005 Free Software Foundation, Inc. echo $$ 3946
Behold the warranty -- the bold print giveth and the fine print taketh away.Comment
-
Originally posted by Sysman View PostCode:GNU bash, version 3.2.17(1)-release (powerpc-apple-darwin9.0) Copyright (C) 2005 Free Software Foundation, Inc. echo $$ 3946
echo $$
760Comment
-
Originally posted by Sysman View PostCode:GNU bash, version 3.2.17(1)-release (powerpc-apple-darwin9.0) Copyright (C) 2005 Free Software Foundation, Inc. echo $$ 3946
ps -ax |grep 3946
3946 ttys000 0:00.07 -bashBehold the warranty -- the bold print giveth and the fine print taketh away.Comment
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Streamline Your Retirement with iSIPP: A Solution for Contractor Pensions Sep 1 09:13
- Making the most of pension lump sums: overview for contractors Sep 1 08:36
- Umbrella company tribunal cases are opening up; are your wages subject to unlawful deductions, too? Aug 31 08:38
- Contractors, relabelling 'labour' as 'services' to appear 'fully contracted out' won't dupe IR35 inspectors Aug 31 08:30
- How often does HMRC check tax returns? Aug 30 08:27
- Work-life balance as an IT contractor: 5 top tips from a tech recruiter Aug 30 08:20
- Autumn Statement 2023 tipped to prioritise mental health, in a boost for UK workplaces Aug 29 08:33
- Final reminder for contractors to respond to the umbrella consultation (closing today) Aug 29 08:09
- Top 5 most in demand cyber security contract roles Aug 25 08:38
- Changes to the right to request flexible working are incoming, but how will contractors be affected? Aug 24 08:25
Comment