Search Results

Search: Posts Made By: nortypig
1,992
Posted By nortypig
ahhh I didn't realise that, I understood the $1...
ahhh I didn't realise that, I understood the $1 stuff but didn't realise if that was at the top of the page it automatically picked up the input.

Thanks guys am learning heaps.
1,992
Posted By nortypig
it doesn't seem to work that way for me... ...
it doesn't seem to work that way for me...

my first lines are

#!/bin/sh
read variable

which automatically throws the cursor below the command waiting for input, and if I enter the input...
1,992
Posted By nortypig
Start Input not on next line?
I'm curious also to find if it is possible to begin input in this manner

$script.sh input

where the user enters 'script.sh' but the input goes directly next to the command instead of the new...
2,670
Posted By nortypig
validation: set field size to 6 digits
I'm curious, how would I set validation on a field size to make sure it only ever accepts a 6 digit number?

I currently have validation for it to be an integer in place but can't find anywhere...
4,507
Posted By nortypig
ah solvered already, wouldn't read about it! ...
ah solvered already, wouldn't read about it!

echo "abc12345" | tr -cd [a-z]+[A-Z]

thanks anyway
4,507
Posted By nortypig
Ranj, I am curious. How could I specify for...
Ranj, I am curious. How could I specify for example...

echo "abc12FG345" | tr -cd [a-z][A-Z]

if I wanted to not delete more than one range, I've played with this a bit but can't find the syntax...
4,507
Posted By nortypig
ahh thanks, I spent a few hours trying to get...
ahh thanks, I spent a few hours trying to get this to work and even had a similar line in there at one time experimenting. Thanks heaps.
4,507
Posted By nortypig
output only numbers from mixed string
it must be late because I'm sure this is an easy task with grep sed or awk

string would be anything mixing numbers letters and ) ( =

output I need is just the numbers... but I just can't seem...
2,603
Posted By nortypig
thanks for the tip :)
thanks for the tip :)
10,324
Posted By nortypig
ah you champion... thanks :)
ah you champion... thanks :)
10,324
Posted By nortypig
ps looks interesting too
ps looks interesting too
10,324
Posted By nortypig
yeh I looked at last too but it was hard to tell...
yeh I looked at last too but it was hard to tell how many records to poll

last -n 20

I'm already grabbing the users off who so I guess if I could get a minutes seconds timestamp from there then...
10,324
Posted By nortypig
i suppose if someone disappears off the who list...
i suppose if someone disappears off the who list then they've logged out and if they appear they've logged in - in the simplest scenario.

implementing that may take a bit of thought (I'm a noob)
10,324
Posted By nortypig
mmm I'm not allowed to do that, can't touch...
mmm I'm not allowed to do that, can't touch anyone's files. I am monitoring movement and who is coming and going on a regular poll but detecting ins and outs is a bit prickly.

I've looked at the...
10,324
Posted By nortypig
detecting login or logout
what function would tell me that a user has logged in or out?

i already know from my script the users name
i already know in real time there was an event

how an I tell if that event was a...
2,603
Posted By nortypig
in the end i winged it with... echo `cat...
in the end i winged it with...

echo `cat file.txt` | cut -d" " -f$count > temp.txt
user=`cat temp.txt`

thanks for the help in sorting this out... cheers
2,603
Posted By nortypig
hi chiru_h thanks for the code but its still not...
hi chiru_h thanks for the code but its still not exactly what I mean... your code wants to read input from the user
2,603
Posted By nortypig
sorry no I meant I just have an arbitrary list of...
sorry no I meant I just have an arbitrary list of names and a while loop set on the $count of the lines in it...

only i can't figure in the loop how to make the line work

user=`cat file1.txt` #...
2,603
Posted By nortypig
read a list one at a time
just have a muddled head at the moment... bare with me.

say i have a variable $count... and a list in a file

i want to use the $count line from that textfile but don't seem to recall how to...
4,932
Posted By nortypig
I think a good example is a file here using...
I think a good example is a file here using gunzip -l

uncompressed: 593
compressed: 355
ratio: 45.5%

when I worked it out as

(difference) / oldsize * 100 / 1

238 / 593 * 100 / 1
...
4,932
Posted By nortypig
could someone explain with set why this isn't...
could someone explain with set why this isn't possible?

set `compress -v fileX` > fileY.txt
4,932
Posted By nortypig
could you recommend a good quality tutorial page...
could you recommend a good quality tutorial page on the uses of set - I don't really see much sense in the man pages for this one...

a tutorial with generalised examples would make it clearer

i...
4,932
Posted By nortypig
hi Igor, thanks but it gives me a syntax error ...
hi Igor, thanks but it gives me a syntax error

syntax error: '(' unexpected
4,932
Posted By nortypig
wow I'm using the UNIX bc calculator within...
wow I'm using the UNIX bc calculator within bourne which to me is a pretty cool way to get away with not leaving and still doing calculations lol...

but if anyone gets a better idea how to grab...
4,932
Posted By nortypig
finding compression ratio in Bourne shell
in the instance of a file compressed with compress to a .Z extension...

how would I, in the Bourne Shell, capture its compression ratio? Gunzip returns -1 and I'd then gone down the track of...
Showing results 1 to 25 of 54

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