Sponsored Content
Top Forums Shell Programming and Scripting Loop logic, enter into respective IF as per enter input file name Post 302846561 by RudiC on Saturday 24th of August 2013 02:50:01 PM
Old 08-24-2013
I'm not sure I understand your logics, but maybe you want to try sth like
Code:
if [ "$a" = "$Test" ] && [ "$filename" = "File1" ]; then

or, maybe, a case "$filename" statement?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

BASH: Any Way to Get User Input Without Requiring Them to Hit the Enter Key?

I'm working on making a menu system on an HP-UX box with Bash on it. The old menu system presents the users with a standard text menu with numbers to make selections. I'm re-working the system and I would like to provide something more akin to iterative search in Emacs. I have a list of 28... (2 Replies)
Discussion started by: deckard
2 Replies

2. Shell Programming and Scripting

how to input answer (enter) if output contains a string?

how to wrote a script that reads an input from the reader (dir name) and then answer yes to all questions in the script unless the answer to any of the questions contains a certain string? example: $] script.sh dir_name $] question_1: (answer should be y right after the question is echoed,... (3 Replies)
Discussion started by: faizlo
3 Replies

3. Shell Programming and Scripting

using read to enter the input at runtime

Hi I am stucked in the below script .I want to input with yes/no from the user and then execute the code inside if but it is not working .I just need the logic as where I am wrong so that i can use the same in my work . then echo "Hi All" fi ]. Please suugest . (4 Replies)
Discussion started by: mani_isha
4 Replies

4. Shell Programming and Scripting

enter key or carriage return as input in perl

hi experts Question in perl i'm creating a script to take from user a different inputs one of them is the carriage return .. so that i want to make an if condition if the user hit enter key the user will go to previous step it something like that chomp ($input = <STDIN>); if ($input =~... (3 Replies)
Discussion started by: doubando
3 Replies

5. Shell Programming and Scripting

Enter an input and reference another line in ksh script

Hi I have a file like so: Code: Frank Peter Tony Robert Mike 1 2 3 4 5 5 4 2 3 1 4 3 1 5 2 My out should look like this: Peter Tony Mike and so on.... I have the first part done to ask the user to... (8 Replies)
Discussion started by: bombcan1
8 Replies

6. Shell Programming and Scripting

function terminating if i give input as space or no input and enter

HI i have written a script to ask input from the user. this script should promote the user for y/n input. if user enters anyother input then y/n the script promotes him again. this below code is working fine for all the cases. except for space and enter " if i give space and enter it is... (2 Replies)
Discussion started by: BHASKARREDDY006
2 Replies

7. Shell Programming and Scripting

View on screen text file and enter input

Is the below correct syntax for if the user enters something other than "GJB2 or MECP2, or PHOX2B", then they are shown on the screen format.txt and allowed to enter in one of those formats? Thank you :). Basically, the user can see which formats are allowed and enter a variant while viewing... (7 Replies)
Discussion started by: cmccabe
7 Replies

8. Shell Programming and Scripting

Input password to bash script, save, and enter when needed

I am looking for a way to start a script and have it prompt for a password that will be used later on in the script to SSH to another host and to SFTP. I don't want the password to be hard coded. Below is my script with the actual IP's and usernames removed. #!/usr/bin/expect -f... (2 Replies)
Discussion started by: jbrass
2 Replies

9. Shell Programming and Scripting

Automatically enter input in command line

Hi, This is a script which to create an opvn user, I want which answer automatically to a certain part so, I try this, it works without the red part but I must type manually.. : #!/bin/bash ## Environnement ## LC_ALL=C ## Paths ## rsa_dir="etc/openvpn/easy-rsa"... (10 Replies)
Discussion started by: Arnaudh78
10 Replies

10. Shell Programming and Scripting

Expect command to send the user input enter or ctrl+c

Hey All, I am writing one script using expect, that script which is used in spawn will accepts only 1. Enter 2. Ctrl+c Press Control-C to exit, Enter to proceed. Could some one share some thoughts to send the above user inputs in linux expect block ? Thanks, Sam (0 Replies)
Discussion started by: SCHITIMA
0 Replies
LWM(1)							      General Commands Manual							    LWM(1)

NAME
lwm - Lightweight Window Manager for the X Window System SYNTAX
lwm [ -s session-id ] DESCRIPTION
Lwm is a window manager for the X Window System. It provides enough features to allow the user to manage their windows, and no more. Windows are surrounded by a frame with a titlebar at the top next to a small box. The frame is a grey colour for all windows except that which has the input focus, where it is black. In the default configuration, lwm uses the enter-to-focus scheme, where moving the pointer into a window gives that window the input focus. Lwm may also be configured to use the click-to-focus scheme, where a window must be clicked on (with any button) to receive the input focus. Clicking on a window in this mode causes the window to be raised. Note that a click used to focus a window is always swallowed by lwm, so clicking a button in a new window requires two clicks. A button 1 click on a window frame brings that window to the top. Dragging button 1 on the frame of a resizable window repositions that edge of the window. If a corner rather than an edge is dragged, then both edges forming the corner are repositioned. While you're reshaping a window, a little window pops up to show you the window's current size. In the default configuration, button 1 on the root window does nothing. Button 2 is used to drag a window by its frame, repositioning the window but maintaining its position in the window stack. In the default configuration, button 2 on the root window brings up a new shell. A button 3 click on a window frame hides that window. Pressing button 3 on the root window brings up a menu of all the hidden windows. Releasing the button while over an item will unhide the named window. A button 3 click in the frame while Shift is held down pushes the window to the back, under any other windows. (Users with 4-button mice are encouraged to use their fourth button for this function.) A click with any button inside the little white box in a window's frame can be used to close the window. OPTIONS
Lwm accepts the following command line options: -s specifies a client ID for the X Session Management system, and is used exclusively by session managers. RESOURCES
Lwm understands the following X resources: titlefont font used in window titles popupFont font used in popup window (menu/size indicator) border width in pixels of window borders button1 program spawned when button 1 is clicked on the root window button2 program spawned when button 2 is clicked on the root window focus focus mode, one of "enter" for enter-to-focus (or sloppy focus), or "click" for click-to-focus SEE ALSO
X(7) AUTHORS
Elliott Hughes <ehughes@bluearc.com>, James Carter <james@jfc.org.uk> LWM(1)
All times are GMT -4. The time now is 09:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy