Sponsored Content
Top Forums Shell Programming and Scripting Replace substring from a string variable Post 303028819 by mohtashims on Tuesday 15th of January 2019 02:42:03 PM
Old 01-15-2019
Thank you for pointing out. i will close this thread.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replace string in a file w/ a variable value

I am trying to replace the default home page for several mac user accounts, I wrote a script that will hunt the files down and replace them with a pre-configured set. The problem I am having is that the download destination path for the browser is hard coded into a .plist (text config file) file... (5 Replies)
Discussion started by: tret
5 Replies

2. Shell Programming and Scripting

Replace variable length numeric string

I have a customer who logged some cc and bank account numbers in their apache logs. I got the cc numbers x'd out with sed -e 's/args=\{16\}/args=XXXXXXXXXXXXXXXX/g' -e 's/cardnum=\{16\}/cardnum=XXXXXXXXXXXXXXXX/g'but that wasn't too difficult due to the value being 16 digits. The bank account... (7 Replies)
Discussion started by: mk4mzid
7 Replies

3. Shell Programming and Scripting

Using sed to replace a string in file with a string in a variable that contains spaces

Hi, i call my shell like: my_shell "my project name" my script: #!/bin/bash -vx projectname=$1 sed s/'PROJECT_NAME ='/'PROJECT_NAME = '$projectname/ <test_config_doxy >temp cp temp test_config_doxy the following error occurres: sed s/'PROJECT_NAME ... (2 Replies)
Discussion started by: vivelafete
2 Replies

4. AIX

Replace string with asterisk(*) in variable

I was trying to replace a string ( for eg - @@asterisk@@ to * ) in variable using cat $INFILE | while read LINE do stmt1=`echo $LINE | sed 's/@@asterisk@@/\*/g'` stmt=$stmt' '$stmt1 stmt2=`echo $LINE` STATEMENT=$STATEMENT' '$stmt2 done echo 'Statement with sed -- > '... (5 Replies)
Discussion started by: Vaddadi
5 Replies

5. Shell Programming and Scripting

Replace string in file with a variable value

Hi Fellows, I am new to shell, please help we me out in this.. i have file which some lines like this.. $$param1='12-jan-2011' $$param2='14-jan-2011' $$param3='30-jan-2011' . . .....so on.. I want to change $$param3 to '31-dec-2011'. i have variable which is storing(30-jan-2011 this... (1 Reply)
Discussion started by: victor369
1 Replies

6. Shell Programming and Scripting

replace (sed?) a string in file with multiple lines (string) from variable

Can someone tell me how I can do this? e.g: a=$(echo -e wert trewt ertert ertert ertert erttert erterte rterter tertertert ert) How do i replace the STRING with $a? I try this: sed -i 's/STRING/'"$a"'/g' filename.ext but this don' t work (2 Replies)
Discussion started by: jforce
2 Replies

7. UNIX for Dummies Questions & Answers

get substring from string variable

Hi Dears, How to use variable in string location of expression ${string:index:length} to get substring from string? I encounter error "bad substitution" when I use expression ${$var:0:5} to get first 5 characters from $var. Could you please help me out of this? Thanks! (2 Replies)
Discussion started by: crest.boy
2 Replies

8. UNIX for Dummies Questions & Answers

Replace variable string with text

Hi All, Hoping someone can help.... I am trying to work out how I can ammend a log file to remove variable strings in order to remove confidential information which I cant pass on. As an example I have used phone numbers. A large log file contains multiple lines containing something like the... (6 Replies)
Discussion started by: mutley2202
6 Replies

9. Shell Programming and Scripting

How to replace string in variable?

Hello, I have simple while and for loops in a shell script and I would like to replace some characters in COL2 when I run it. I am on ubuntu 14.04 while read COL1 COL2 COL3 COL4 do name=$COL2 #cat $name | sed -i "s|_| |g" $name for i in $COL3 $COL4 do some codes ...... run $i b="$name"... (11 Replies)
Discussion started by: baris35
11 Replies

10. UNIX for Beginners Questions & Answers

Replace substring by longest string in common field (awk)

Hi, Let's say I have a pipe-separated input like so: name_10|A|BCCC|cat_1 name_11|B|DE|cat_2 name_10|A|BC|cat_3 name_11|B|DEEEEEE|cat_4 Using awk, for records with common field 2, I am trying to replace all the shortest substrings by the longest string in field 3. In order to get the... (5 Replies)
Discussion started by: beca123456
5 Replies
glutSetCursor(3GLUT)						       GLUT						      glutSetCursor(3GLUT)

NAME
glutSetCursor - changes the cursor image of the current window. SYNTAX
#include <GLUT/glut.h> void glutSetCursor(int cursor); ARGUMENTS
cursor Name of cursor image to change to. Possible values follow: GLUT_CURSOR_RIGHT_ARROW Arrow pointing up and to the right. GLUT_CURSOR_LEFT_ARROW Arrow pointing up and to the left. GLUT_CURSOR_INFO Pointing hand. GLUT_CURSOR_DESTROY Skull & cross bones. GLUT_CURSOR_HELP Question mark. GLUT_CURSOR_CYCLE Arrows rotating in a circle. GLUT_CURSOR_SPRAY Spray can. GLUT_CURSOR_WAIT Wrist watch. GLUT_CURSOR_TEXT Insertion point cursor for text. GLUT_CURSOR_CROSSHAIR Simple cross-hair. GLUT_CURSOR_UP_DOWN Bi-directional pointing up & down. GLUT_CURSOR_LEFT_RIGHT Bi-directional pointing left & right. GLUT_CURSOR_TOP_SIDE Arrow pointing to top side. GLUT_CURSOR_BOTTOM_SIDE Arrow pointing to bottom side. GLUT_CURSOR_LEFT_SIDE Arrow pointing to left side. GLUT_CURSOR_RIGHT_SIDE Arrow pointing to right side. GLUT_CURSOR_TOP_LEFT_CORNER Arrow pointing to top-left corner. GLUT_CURSOR_TOP_RIGHT_CORNER Arrow pointing to top-right corner. GLUT_CURSOR_BOTTOM_RIGHT_CORNER Arrow pointing to bottom-left corner. GLUT_CURSOR_BOTTOM_LEFT_CORNER Arrow pointing to bottom-right corner. GLUT_CURSOR_FULL_CROSSHAIR Full-screen cross-hair cursor (if possible, otherwise GLUT_CURSOR_CROSSHAIR). GLUT_CURSOR_NONE Invisible cursor. GLUT_CURSOR_INHERIT Use parent's cursor. DESCRIPTION
glutSetCursor changes the cursor image of the current window. Each call requests the window system change the cursor appropriately. The cursor image when a window is created is GLUT_CURSOR_INHERIT. The exact cursor images used are implementation dependent. The intent is for the image to convey the meaning of the cursor name. For a top-level window, GLUT_CURSOR_INHERIT uses the default window system cursor. X IMPLEMENTATION NOTES
GLUT for X uses SGI's _SGI_CROSSHAIR_CURSOR convention to access a full-screen cross-hair cursor if possible. SEE ALSO
glutCreateWindow, glutCreateSubWindow AUTHOR
Mark J. Kilgard (mjk@nvidia.com) GLUT
3.7 glutSetCursor(3GLUT)
All times are GMT -4. The time now is 04:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy