Search Results

Search: Posts Made By: Great Uncle Kip
4,539
Posted By Great Uncle Kip
Full script at present looks like this - rm...
Full script at present looks like this -

rm -f ~/LAFILE 2>/dev/null
cp -f /pcms/utils/addur/current/LASTAPPLIED ~/LAFILE
echo "Please enter the username for which you require access to be set...
4,539
Posted By Great Uncle Kip
Hi I've got this now - PS3="Please...
Hi

I've got this now -

PS3="Please select the number of the system that you wish to access: "

select SYSTEM in Sys1 Sys2 Sys3
do
cat ~/LAFILE | grep "$SYSTEM" | grep "$USERNAME"
if [[...
4,539
Posted By Great Uncle Kip
IF statement
Hi

I'm currently writing a script that looks at the contents of a file and returns a value, based on a user input-

do
cat ~/LAFILE | grep "$SYSTEM" | grep "$USERNAME"
if ! grep user...
4,768
Posted By Great Uncle Kip
Using exit status of GREP to proceed
Hi

I have a script that carries out a "grep" command, and displays the output on screen.

What I need to do is utilise the exit status of this grep, so that, for example, if it returns no...
2,698
Posted By Great Uncle Kip
Many thanks for all the help, its now working a...
Many thanks for all the help, its now working a treat.
2,698
Posted By Great Uncle Kip
Using a list menu as a variable
Hi again

I have the follwing - cat ~/ABCFILE | grep "$SYSTEM" | grep "$USERNAME"

What I'm looking to do is have the variable for $SYSTEM determined by the user making a selection from a...
10,451
Posted By Great Uncle Kip
Thats excellent, got it working a treat, thanks...
Thats excellent, got it working a treat, thanks guys.
10,451
Posted By Great Uncle Kip
Thanks very much both. So the code to take...
Thanks very much both.

So the code to take the users reply and grep it against a particular directory would be something like grep ${SEARCHTERM} ~/ABC123 ?
10,451
Posted By Great Uncle Kip
Taking a Users input to for the basis of a Grep
Hi

I'm currently putting together a script that will grep a set of data for a particular input, specified by the user.

I'm getting myself all tangled up with my Echo's and reads.

What i'm...
4,760
Posted By Great Uncle Kip
Thanks for all the help, got the script up and...
Thanks for all the help, got the script up and running, tested, and it works fantastic!
4,760
Posted By Great Uncle Kip
All the help so far has been cracking, cheers...
All the help so far has been cracking, cheers all!

One last thing i'm just wondering.....

Is there a command where I can check if a directory exists, before removing it? If it does, I want the...
4,760
Posted By Great Uncle Kip
Thanks very much vbe. This is what I have so...
Thanks very much vbe.

This is what I have so far-

cd ~
~/.mozilla
ls -a
echo "Do you wish to remove and re-install the .mozilla profile? Y/N"
read answer
echo "The answer is $answer"
exit...
4,760
Posted By Great Uncle Kip
Script to change/find/delete/install a specific file
Hi

Very much a newbie to UNIX & scripting, but have identified an area within work that would benefit from being automated, as its repeated manually very often, and it looks like the ideal first...
4,364
Posted By Great Uncle Kip
Writing a "for" loop
Hi All.

I'm new to Unix, decided to embrace it finally, and am so impressed.

As part of my learning plan, i've been set this question but i'm a bit stuck as to where to start!

Set a variable...
Showing results 1 to 14 of 14

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