Sponsored Content
Top Forums Shell Programming and Scripting Different behavior between bash shell and bash script for cmd Post 303023625 by da1 on Thursday 20th of September 2018 06:41:44 AM
Old 09-20-2018
I actually had it in quotes but copy pasted the initial code that I ended up adjusting.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mimic bash history behavior

Does anyone know of a way to mimic the up arrow/down arrow type bash behavior within a shell script? Say I have a scripted menu, and would like to be able to up arrow to bring up the last X number of lines of user input? Thanks to anybody with a suggestion. :) (0 Replies)
Discussion started by: sysera
0 Replies

2. Shell Programming and Scripting

how to make your bash script run on a machine with csh and bash

hi, i have a script that runs on bash and would like to run it on a machine that has csh and bash. the default setting on that machine is csh. i dont want to change my code to run it with a csh shell. is there any way i can run the script (written in bash) on this machine? in other words is there... (3 Replies)
Discussion started by: npatwardhan
3 Replies

3. Shell Programming and Scripting

BASH quoting behavior

The block below isn't a surprise:$ ls file1 file2 file3 $ x=* $ echo $x file1 file2 file3 $ echo '$x' $x $ echo "$x" * $But I found this block a bit bewildering:$ echo $x' >' * $I'm wondering why substitution wasn't performed on the $x, since it was unquoted (as far as I can tell).... (5 Replies)
Discussion started by: na5m
5 Replies

4. Red Hat

BASH command not found strang behavior

Hi all I am relatively new to linux (specifically red hat). I have installed Fedora 13 on my machine and started playing with the terminal when i found a very strange behavior when typing a command that is not found: the terminal does not prompt me back. In other words, i am logged as root (or... (4 Replies)
Discussion started by: abohmeed
4 Replies

5. UNIX for Advanced & Expert Users

Different redirection behavior in BASH/Linux when run under cron vice login ???

run_xfs_fsr is a xfs filesystem maintenance script designed to run under cron. The system is a home theater personal computer running mythbuntu 10.10, and is accessed remotely for these tests. cron runs a script, (xfs_fsr.sh) at 02:30 that runs the subject script under BASH and sets the... (3 Replies)
Discussion started by: keepitsimpleeng
3 Replies

6. UNIX for Advanced & Expert Users

unexpected behavior bash, set -o vi, history -a, and HISTFILE

I am trying to get my history in sync in multiple bash sections and things aren't working the way I expect. Desired behavior, hitting esc-K in all bash sessions (same userid and machine) will use the same history. Observed behavior: Esc-k shows the history of the current session, rather than... (8 Replies)
Discussion started by: gg48gg
8 Replies

7. UNIX for Dummies Questions & Answers

Im new to bash scriping and i found this expression on a bash script what does this mean.

# check host value regex='^(||1|2|25)(\.(||1|2|25)){3}$' if ')" != "" ]; then if ]; then echo host $host not found exit 4 fi elif ]; then echo $host is an invalid host address exit 5 fi espeacailly the top regex part? ---------- Post updated at 06:58 PM ---------- Previous update was... (1 Reply)
Discussion started by: kevin298
1 Replies

8. UNIX for Advanced & Expert Users

Bash : While Loop behavior

Good Morning I think there may be something I dont understand fully. The following code works well, but I dont like the set domen method. #!/bin/bash # domen="y" while do echo " M A I N - M E N U" echo "1. Contents of /etc/passwd" echo "2. List of users currently logged" echo... (10 Replies)
Discussion started by: popeye
10 Replies

9. Shell Programming and Scripting

How to block first bash script until second bash script script launches web server/site?

I'm new to utilities like socat and netcat and I'm not clear if they will do what I need. I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes. I'm using Cygwin bash on Windows 10. My... (3 Replies)
Discussion started by: siegfried
3 Replies

10. UNIX for Beginners Questions & Answers

In Bash shell - the ps -ef shows only the /bin/bash but the script name is not displayed

In Bash shell - the ps -ef shows only the /bin/bash but the script name is not displayed ? Is there any way to get the script names for the process command ? --- Post updated at 08:39 AM --- in KSH (Korn Shell), my command output shows the script names but when run in the Bash Shell... (3 Replies)
Discussion started by: i4ismail
3 Replies
SoXtClipboard(3IV)()													      SoXtClipboard(3IV)()

NAME
SoXtClipboard -- Provides Inventor copy/paste support INHERITS FROM
SoXtClipboard SYNOPSIS
#include <Inventor/Xt/SoXtClipboard.h> typedef void SoXtClipboardPasteCB(void *userData, SoPathList *pathList) typedef void SoXtClipboardImportCB(void *userData, Atom dataType, void *data, uint32_t numBytes) #define _XA_CLIPBOARD_ ((Atom) 0) Methods from class SoXtClipboard: SoXtClipboard(Widget w, Atom selectionAtom = _XA_CLIPBOARD_) ~SoXtClipboard() void copy(SoNode *node, Time eventTime) void copy(SoPath *path, Time eventTime) void copy(SoPathList *pathList, Time eventTime) void copy(Atom dataType, void *data, uint32_t numBytes, Time eventTime) void paste(Time eventTime, SoXtClipboardPasteCB *pasteDoneFunc, void *userData = NULL) void addPasteInterest(Atom dataType, SoXtClipboardImportCB *pasteImportFunc, void *userData = NULL) DESCRIPTION
This class manages data transfers for copy and paste. Transfers may occur within the same process, or between different processes. This uses the Xt selection mechanism to implement the ICCCM protocol for the transfer of data. METHODS
SoXtClipboard(Widget w, Atom selectionAtom = _XA_CLIPBOARD_) ~SoXtClipboard() Constructor and destructor. w is the Xt widget for which this clipboard acts as an agent. selectionAtom is the X selection through which data should be transferred. For quick data transfers, this should be XA_PRIMARY. The default is _XA_CLIPBOARD_ which uses the X clip- board selection. void copy(SoNode *node, Time eventTime) void copy(SoPath *path, Time eventTime) void copy(SoPathList *pathList, Time eventTime) This copies the passed scene graph object, and tells the X server that the clipboard now owns the selection which was specified by selectionAtom in the constructor. When a paste happens (in this window, another window, or another process), the X server will ask this clipboard for the data it copied here. The eventTime should be the time found in the X event structure which triggered the copy opera- tion, and is used to ensure synchronization of copy and paste requests. Data targets supported for export are INVENTOR_2_1, INVEN- TOR_2_1_FILE, INVENTOR_2_0, INVENTOR_2_0_FILE, VRML_1_0, VRML_1_0_FILE. Also exported for backwards compatibility are INVENTOR and INVENTOR_FILE, which are equivalent to INVENTOR_2_0 and INVENTOR_2_0_FILE. void copy(Atom dataType, void *data, uint32_t numBytes, Time eventTime) This behaves like the above copy routines, but the data can be in any format as specified by dataType. void paste(Time eventTime, SoXtClipboardPasteCB *pasteDoneFunc, void *userData = NULL) This makes a request to the X server for data to paste from the selection atom specified in the constructor (selectionAtom), then returns. When the data is retrieved from the selection owner, the pasteDoneFunc callback is invoked. The newly pasted data is passed as the callback function's pathList argument (an SoPathList). Data targets supported for import are INVENTOR_2_1, INVENTOR_2_1_FILE, INVEN- TOR_2_0, INVENTOR_2_0_FILE, VRML_1_0, VRML_1_0_FILE. Also imported for backwards compatibility are INVENTOR and INVENTOR_FILE, which are equivalent to INVENTOR_2_0 and INVENTOR_2_0_FILE. void addPasteInterest(Atom dataType, SoXtClipboardImportCB *pasteImportFunc, void *userData = NULL) This extends the paste interest to recognize an additional target as specified by dataType. It can be called multiple times to register interest in more than one extension. The pasteImportFunc will be called when data of the registered type is pasted. Passing NULL as the pasteImportFunc will remove paste interest for that data type (even if the data type is one of the defaults). This should be called before paste() so that paste() will accept pastes of data types that have been registered here. A dataType atom can be created with XmInternAtom, e.g.: XmInternAtom(XtDisplay(widget),"INVENTOR",False); SEE ALSO
SoSelection, SoByteStream, SoXt, X Selections SoXtClipboard(3IV)()
All times are GMT -4. The time now is 06:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy