04-11-2012
Thank you Very Much...sorry to bother you....will take care of the indentation and etc...
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Please let me know how to cut first four characters from a line in UNIX after grepping the file.. (5 Replies)
Discussion started by: kaushikraman
5 Replies
2. Shell Programming and Scripting
Hi All,
Need to convert file names to upper case using tr command in Unix.
In a folder -> /apps/dd01/misc
there are two files like:
pi-abcd567sd.pdf
pi-efgh1.pdf
The output of should be like:
pi-ABCD567SD.pdf
pi-EFGH1.pdf
I have used the command to work as below:
for f... (3 Replies)
Discussion started by: a1_win
3 Replies
3. Shell Programming and Scripting
Guys,
can you help me in doing cut first 21 and 32-35 characters from file.
I tried with cut -c to cut first 21 characters ,It is succeeded.
But i need both first 21 and 32-35. (1 Reply)
Discussion started by: mohan_xunil
1 Replies
4. Shell Programming and Scripting
Hi Gurus,
I am trying to execute the below command. However the output shows the value + path of the folder where the command is being executed. But I am only interested in the value but not the path.
du -hs /aps/inf/SeLogs
when I execute the above command, output is
32G... (5 Replies)
Discussion started by: svajhala
5 Replies
5. Shell Programming and Scripting
I need to cut the last seven characters of a variable length variable. The variable may be 7 characters or 70. I need to always be able to grab the last 7 characters. I looked at the cut command but it always seems to want to start at the beginning of a line, not the end and count backwards.
... (5 Replies)
Discussion started by: kblawson14
5 Replies
6. Shell Programming and Scripting
Hi,
I would like to cut last 13 characters of a file name and take the rename the file name as follows:
Input:
A.DAT20110517033732
Output:
A.DAT
I have tried the following command and cut last 13 characters.
echo A.DAT20110517033732 | awk '{print substr($0, length($0)-13)}'
... (3 Replies)
Discussion started by: pyaranoid
3 Replies
7. Shell Programming and Scripting
Hi Everyone,
i have a file 1.txt
<a><a"" dd>aaaaauweopriuew</f><">!(^)!</aa></ff>
<a><a"" dd>bbbbbuweopriuew</f><">!(^*)!</aa></ff>
i know i can use
perl -p -i -e "s/>aaaaa/aa/g" 1.txt
perl -p -i -e "s/>bbbbb/bb/g" 1.txt
to acheive only keep the first two characters of the five characters,... (4 Replies)
Discussion started by: jimmy_y
4 Replies
8. Shell Programming and Scripting
i have following fixed width text(also has a delimiter)
id;name;age;comments1;comments2;title;date
to get output as
id;name;age;;;title;date (remove comments but keep the delimiter in between)
i use cut -c1-12,22,32-
suppose if i want to insert another ; somewhere like ... (3 Replies)
Discussion started by: petergemeni
3 Replies
9. Shell Programming and Scripting
helloo
I wonder if there's a way to cut characters out of a string and keep only
the last 2 by using sed.
For example if there's the todays' date:
2012-05-06
and we only want to keep the last 2 characters which are the day.
Is there a quick way to do it with sed? (2 Replies)
Discussion started by: vlm
2 Replies
10. Shell Programming and Scripting
Hello All
I have a file like this
abc.tpt.ctl
bdc.tpt.ctl
cdw.tpt.ctl
I have looped every line using the for Loop, now I want to take each line and cut the .tpt.ctl part of it and store it in a variable and use the variable in same loop.
The part I am stuck at is how do I cut the last... (9 Replies)
Discussion started by: nnani
9 Replies
LEARN ABOUT NETBSD
set_display_switch_mode
set_display_switch_mode(3alleg4) Allegro manual set_display_switch_mode(3alleg4)
NAME
set_display_switch_mode - Tells Allegro how the program handles background switching.
SYNOPSIS
#include <allegro.h>
int set_display_switch_mode(int mode);
DESCRIPTION
Sets how the program should handle being switched into the background, if the user tabs away from it. Not all of the possible modes will be
supported by every graphics driver on every platform. The available modes are:
SWITCH_NONE
Disables switching. This is the default in single-tasking systems like DOS. It may be supported on other platforms, but you should use it
with caution, because your users won't be impressed if they want to switch away from your program, but you don't let them!
SWITCH_PAUSE
Pauses the program whenever it is in the background. Execution will be resumed as soon as the user switches back to it. This is the default
in most fullscreen multitasking environments, for example the Linux console, but not under Windows.
SWITCH_AMNESIA
Like SWITCH_PAUSE, but this mode doesn't bother to remember the contents of video memory, so the screen, and any video bitmaps that you
have created, will be erased after the user switches away and then back to your program. This is not a terribly useful mode to have, but it
is the default for the fullscreen drivers under Windows because DirectDraw is too dumb to implement anything better.
SWITCH_BACKGROUND
The program will carry on running in the background, with the screen bitmap temporarily being pointed at a memory buffer for the fullscreen
drivers. You must take special care when using this mode, because bad things will happen if the screen bitmap gets changed around when your
program isn't expecting it (see below).
SWITCH_BACKAMNESIA
Like SWITCH_BACKGROUND, but this mode doesn't bother to remember the contents of video memory (see SWITCH_AMNESIA). It is again the only
mode supported by the fullscreen drivers under Windows that lets the program keep running in the background.
Note that you should be very careful when you are using graphics routines in the switching context: you must always call acquire_screen()
before the start of any drawing code onto the screen and not release it until you are completely finished, because the automatic locking
mechanism may not be good enough to work when the program runs in the background or has just been raised in the foreground.
RETURN VALUE
Returns zero on success, invalidating at the same time all callbacks previously registered with set_display_switch_callback(). Returns -1
if the requested mode is not currently possible.
SEE ALSO
set_display_switch_callback(3alleg4), get_display_switch_mode(3alleg4), exmidi(3alleg4), exswitch(3alleg4)
Allegro version 4.4.2 set_display_switch_mode(3alleg4)