Software :: Script To Delete The User Define Input

Oct 26, 2010

I ve a script to delete a folder is given below:

1. I need a script to clear the cacheroot in my box.

2. What user mention to delete the folder that should ve to delete.

View 5 Replies


ADVERTISEMENT

Programming :: Shell Programming - Delete User Input

Jan 21, 2011

I recently started shell programming and my task now is to do a menu display.Currently i am stuck whereby user will input both title and author and it will delete it.

Do i have to use sed command?

View 4 Replies View Related

General :: Define A Keyboard Layout / Input Method For Ubuntu In Python?

Jun 20, 2010

defining keyboard layouts in linux (ubuntu 10.04 here). there does not seem to be any easy, graphical way to define keyboard mappings (except for keyboardlayouteditor, but frankly, i do not understand the installation description.i am using an apple aluminum keyboard with a german layout, but no matter what i do the (<>) and (^°) keys are always swapped (i did manage to change the default behavior for the f1...f12 keys from multimedia back to 'ordinary', application-centric... all you have to do is add the line echo 2 > /sys/module/hid_apple/parameters/fnmode to /etc/rc.local... this is so bloody obvious i am ashamed i had to search the web for this!).

adding to my distress, i find the chinese IMEs a horror (not a single one of the many i tried does anywhere come near google pinyin for windows), and have gotten neither ibus nor scime to work in a satisfactory way for me. i find linux keyboard handling a morass. i know this must be one of the hardest problems in computer science, since this subject gets so convoluted no matter whether its on windows or in-the-browser javascript. as a linguist i am well aware of the inherent complications proper text handling poses, but looking at descriptions how to configure xkb makes building interstellar spaceships look like a cakewalk.

find a place in the system where keystrokes are recorded;read out those codes (could be scan codes or character codes) using a daemon (implemented in python; i heard you have to listen to IOCTL or somesuch); when certain code combinations appear, switch them to do what you want;applications now get to see a X where formerly the got to see a U and vice versa;profit!

Is there a place, in ubuntu / linux systems that does allow reading out keyboard codes? Is there a way to block processing of such keyboard actions until an intercepting daemon has processed them? Would such an interceptor work for a broad range of use cases? like on the command line, in a gtk app, in wine, in firefox and so on? An alternative would actually be to grok keyboardlayouteditor, so if someone could post about a readable, complete installation instruction or point out installable packages, that'd be great, too.

View 1 Replies View Related

Red Hat / Fedora :: Define User /password For Sasl?

Mar 26, 2011

I need define a user /password for sasl but want the authentication at runtime be automatic - no explicit prompting the user while accessing a tcp socket with some applications that need the authentication (e.g libvirt)

so I try : saslpasswd2 -c -p -a libvirt <user>

and it hangs (if i now press Enter it says : "invalid parameter supplied") . if I avoid the -p flag the above commad works fine and prompts for password and later when using the tcp it prompts for the above defined user/password and autheticates ok .
But I want without the explicit authentication

The man pages says -p Pipe mode - saslpasswd2 will neither prompt for the password nor verify that it was entered correctly. This is the default when standard input is not a terminal.

In the past (before some upgrading of libvirt via rpm) I had the SASL authentication at runtime done automatically with no explicit prompting the user

View 1 Replies View Related

General :: Add A Rule In User Define Chain?

Nov 30, 2010

I have created a new user define chain # iptanles -N blacklistNormally when we add a new rule it automatically insert in the default iptable but when we create a user define chain then how can I add my rules in this chain ?

View 3 Replies View Related

Fedora Security :: Delete Input History?

Oct 18, 2010

What command is used to delete input command history in terminal ?I am afraid my friend will trace what been inpu

View 10 Replies View Related

Fedora :: Allow User To Save/edit/delete Documents In A Folder But Not Delete That Folder?

Sep 6, 2011

Recently I setup a system for a non-technical user. He is only using Firefox, Pidgin and OpenOffice for about 2 hours a day. I have created a folder "/home/jim/myFiles" where he can save his document files. But Jim has accidentally deleted his myFiles folder on 2 occasions. He had intended to delete a file in that folder. Is there a way to lock the folder so that the user and create/read/write documents in that folder but not delete the folder itself?

View 14 Replies View Related

General :: Get User Input Into A Script ?

Nov 5, 2009

I have a section of a script that is supposed to change the filename of similar files in a directory. It works the way I need it to work, except that I would like to input the new filename each time it runs without having to edit the script.

I capture 5-6 images into ~/screenshots. They are labeled Picture 1.png, Picture 2.png, etc. I would like to be able to rename them as Lesson 1.png, Lesson 2.png, and so forth. It works if I hardcode the new NAME (Lesson) into the script, but I want to replace NAME with a variable that I can input at a prompt or pass into the script from another. I have tried setting a variable and replacing "Lesson" with $variable in line #11, but that leaves me with only the extension and no filename.

I have also tried using $1 on the command line:

Here is what I have that works:

How do I get a variable into this script?

View 2 Replies View Related

Programming :: User Input Bash Script

Apr 28, 2010

I've written a bash script that allows a user to input a directory location to find out the size of the directory. However, if the user inputs a directory and finds its size then inputs another directory then wants to quit, the script asks the user numerous times if he wants to quit!! The script won't exit until the number of times the user looks at a directory is reached! What gives?

Here's the script:

Code:

View 4 Replies View Related

Red Hat / Fedora :: Getting User Input In A Shutdown Init.d?

Feb 25, 2010

I have a service that when shutdown requires a username and password. I use `read` in my script to gather this info because I can't have it in the file. When I run the init script by hand it will ask for the username and password and everything shutsdown properly. When I run reboot or halt I get no prompt. get user input in a shutdown process?

View 2 Replies View Related

General :: How To Get Invalid User Input Into Variable?

Apr 8, 2010

I have a script in which it searches the password file for a username based on the user's input. Is there a way I can take the bad input and keep it in a variable. (one that keeps adding all the non-existent users)so how would I get non-existent users into another variable?

View 9 Replies View Related

Programming :: C - User To Input The Name Of A File As An Argument

Aug 5, 2010

Write a program that requires the user to input the name of a file as an argument. If the user fails to include one argument it should make use of a thread that handles a signal. The signal handler should tells the user Incorrect number of arguments and then calls the terminate signal on the process.

If the numbers of arguments are correct then the program should allocate memory space to the file (5MB) and create a child process that requests the user for a character that it should send to the parent. The child should keep request for data until the user keys in the character O. During each request it should pause for 10 seconds, send the character to the parent and then requesting again for another character.

The parent should get the character from the child. Do not make the parent wait for the child to finish requesting for data. Make use of pipes to facilitate communication between the parent and the child. A second child should be created to read and display data from the file. Make use of any appropriate Inter Process Communication technique to ensure that the second child and the parent do not access the file simultaneously (Mutual exclusion).

View 5 Replies View Related

Programming :: Working With User Input In Bash

Jun 2, 2009

I've been using python/bash to help myself automate things for a long time, however I am curious. One reason I use python more is because I don't quite know how to work with user input in Bash, such as getting it to ask for input and wait, and then placing that user input into a command.

Here's an example of a script I use from time to time for converting OGG video files into AVI.

How could I write this same script in Bash? Keep in mind I am mostly self taught, so I am by no means an expert programmer.

Code:

View 3 Replies View Related

Fedora :: Add A Variable To Take User Input And Post That Imput?

Sep 25, 2009

I'm sure you all seen how you can use curl to post to you twitter acct. What I'm wondering is how to add a variable to take user input and post that imput.

Code:
#!/usr/bin/perl
"Enter tweet: ";
$msg = <STDIN>;

[Code]...

View 3 Replies View Related

Ubuntu :: Display Message To And Accept Input From User?

Jul 4, 2010

I am using LuckyBackup to back up my laptop disk to a USB disk. I would like to display to the user the message "Please mount backup disk" and have the user click "OK". LuckyBackup has a feature to allow issuing commands before it does the backup. I have been investigating scripts (I have never written one.), but do not understand how to use them to this end.

View 4 Replies View Related

Ubuntu :: Bash Script, Take User Input Then Use It As A Path?

Jan 29, 2011

I'm trying to make a script to make it quicker to encode videos.

Code:
#!/bin/bash
echo "Type the path of the video file"

[code]....

View 9 Replies View Related

Applications :: Trace User's Command Input History?

Jul 15, 2010

I wanna trace user's command input history. but I dont plan to use "history", "lastcomm" becauze there is not detail of the user command history. if there is some software use to log user command to one file or database, it's suit for me.

View 1 Replies View Related

General :: User Defined Input In Shell Script

Dec 2, 2010

I want ssh a remote server through shell script with predefines username and passwd. i dont know how to use expect command to do that.

View 4 Replies View Related

Software :: Read Multiple Lines From User Input In C?

Feb 26, 2010

in c how to read multiple lines from user input

using scanf it is not possible and using gets we can able to read one line at a time
hoe to read multiple lines at a time from user input....

View 1 Replies View Related

Programming :: Array Size Base On User Input?

Oct 27, 2010

If I have an array which its size is based on the user input, from some material, I need to use malloc function to allocate memory for that array what is known dynamic array. Don't forget to free it.hat's fine, however, I like to try things out even I know the program will crash.I have written some test program on my Mac using C language like this:int width = 0;//get user input, and assign the input value to width, for example, 3char * array_var[width];and width is an int, its value will be assigned by the user input. The point is, this program work as expected, for example, in command line, I input 3, then array_var length is 3, its size is 3 * sizeof(char *).

View 1 Replies View Related

Programming :: Bash Script Predefined User Input

Aug 9, 2009

I have a script im having some problems with, what I need is to have the system generate a random password for me and use that password when creating new users to it.

System is Debian Lenny and script is in bash.

The program is znc. I have made it so that it will generate the random password on the shell but the problem is to use it in the bnc software.

To make a password there the command is znc --makepass and look like this:

My question is now if it would be possible to put in the script so it would "answer" when it need those passwords ? the random password that is generated is in a variable called $setpass and is NOT crypted.

Or is there any other software that would be able to generate that md5 string for me ?

View 7 Replies View Related

Ubuntu :: Way To Delete User Name

Feb 28, 2010

I am trying to delete the user name I used to originally install Ubuntu. Every time I restart the computer the entry has returned.Is it undeleteable?

View 4 Replies View Related

Ubuntu :: Cannot Delete User?

Aug 1, 2010

I am having a problem with my login labeled "mysql" with the command # groupadd mysql# useradd -g mysql is is of course all within the confines of being super user. What I am having trouble with is that I cannot delete the user through the terminal using the command userdel but to no avail, it states that the user mysql is still logged in even though I have restarted the computer and logged in only to my root account.Whenever I try to log into mysql account it gives me multiple error messages something about the ICE authority and nautilus and when i get past these and onto the home screen, there is nothing, the wallpaper is there but there are no icons and no tool-bars, I cannot shutdown or get to a terminal while on the dysfunctional user. I cannot delete the user because it states I am logged in even though I am not.

View 3 Replies View Related

OpenSUSE Install :: User Account Refuses Keyboard Input?

Dec 18, 2009

openSuse v11.1
Linux 2.6.27.39-0.2-default x86_64
VirtualBox v3.1.0

One user account completely ignores all keyboard input. No other account demonstrates this bizarre behavior. The faulty account has had occasional keyboard difficulty but it has always been related to the Virtual Machines (VirtualBox); the hosting account always functioned correctly.

Then the ban on keyboard input. Poof! "Keyboard? What keyboard? I don't see no stinking keyboard!"

It is not the physical keyboard. Three different hardware exhibit the same fault. It is not the motherboard; two mb's show the same fault. It is only that one account. And I even took the Windows route of re-installing the OS (what a waste of time that was).

If something changed, I am not aware of it (although something must have).

View 9 Replies View Related

Software :: Using An Shell Script - How To Change A Value In A File According To The User Input

Sep 28, 2009

I have a file called a.sql which I need to execute in a database and the script I am calling in a shell script .Before executing the script I have to change a value in the script according to the user input.How can I do this .

Eg...
A.sql file contains an sql query like this:

And My shll script is like this:

When executed the script it asks for enter salary and if the user has input 5000 then the Enter_salary value in a.sql must be replaced by 5000.

View 6 Replies View Related

Programming :: Catch User Input While The Bash Script Is Running?

Oct 30, 2010

How do you catch user input while the script is running? Or, how would you make two scripts run at the same time, but use input from one script to the other? The program I'm trying to make, echos text on the screen continuously, but while thats happening, I want the user to be able to input something, so the program can detect the input and display something else. So I thought maybe I could make two scripts run to do each task.

View 5 Replies View Related

Programming :: Take A Single Line Of Input From User In Shell Script?

Mar 10, 2011

How do i take a single line of input from the user in a shell script?

View 3 Replies View Related

Ubuntu :: How To Delete Old User Account

Aug 7, 2011

How do I remove another user? I created a fresh user because of issues from the old user. Now I would like to remove that account. How do I do that?

View 1 Replies View Related

General :: Delete User From Group?

Jan 28, 2010

how to delete a user from a group? i am new to this group started linux admin course.

View 4 Replies View Related

Server :: Delete A Ftp User On Centos 5?

Jun 11, 2011

How can i delete a ftp user on linux server centos 5 ?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved