Sponsored Content
Full Discussion: Indentation help
Top Forums Shell Programming and Scripting Indentation help Post 302312269 by Corona688 on Thursday 30th of April 2009 07:27:25 PM
Old 04-30-2009
What does your editor of choice do to tabs? What is your editor, for that matter? Tabs should still be there even if differently sized unless your editor does something weird.

try 'setterm -regtabs 4' to make a console have tabs at 4 spaces. In my case I had to force it with 'TERM=linux setterm -regtabs 4'

Last edited by Corona688; 04-30-2009 at 08:48 PM..
 

10 More Discussions You Might Find Interesting

1. Programming

A question of indentation

Hi, Using GNU indent(1) I tried to indent a C source file which has no indentation (all lines start at column 1). The result I am trying to achieve, should look like this with the exception that only tabs are used for indentation (no spaces). Unfortunately, I couldn't find the appropriate... (1 Reply)
Discussion started by: Michael Iatrou
1 Replies

2. Programming

Emacs line indentation

Hi. I'm writing a document in Python, so indentation is crucial. I want to indent a whole section by exactly one tab. Any idea how to go about this? I'm using terminal emacs (no mouse input) Thanks for any help! (2 Replies)
Discussion started by: Rledley
2 Replies

3. UNIX and Linux Applications

Setting vi indentation to k&r style?

A bit of searching on Google did not seem to yield any really helpful results on how to set vim to use k&r indentation style. I know Emacs has such a feature, but does vim? If so, how do I turn it on? I am just starting to learn vi, and when I am coding in C it looks really ugly without some sort... (2 Replies)
Discussion started by: kermit
2 Replies

4. Shell Programming and Scripting

Regarding indentation using unix script

I have piece of Informatica code in a file as : IIF(substr(flag,0,2)=1,false,IIF(flag= 1 ,0,NULL)) Please provide me with idea how to write a unix script which reads this file and write indented code into another file. The output in the second file should look as: ... (1 Reply)
Discussion started by: srikanth.ch
1 Replies

5. Shell Programming and Scripting

indentation and lowercase to uppercase

hi, i need to write a bash script that does two things. the program will take from the command line a file name, which is a C code, and an integer, which is the size of my indentation i would then have to indent every nested code by the number of columns provided by the user in the... (1 Reply)
Discussion started by: kratos.
1 Replies

6. Shell Programming and Scripting

Change indentation in scripts

Hi, I am a professional in writing shell scripts, and I am using a one-space indentation like this for i in file1 file2 do if then echo "$i" fi done so very deeply nested stuff still fits on my screen. At release time I usually double the indentation via sed 's/^ */&&/' to make... (8 Replies)
Discussion started by: MadeInGermany
8 Replies

7. UNIX for Dummies Questions & Answers

Indentation using awk

I need to write an awk program who does this http://i.stack.imgur.com/yzSqB.jpg I'd be very grateful for any help, Thanks a lot (1 Reply)
Discussion started by: guy9050
1 Replies

8. Homework & Coursework Questions

Indentation using awk

1. The problem statement, all variables and given/known data: I need to write an awk program who does this (sorry its too big) http://i.stack.imgur.com/yzSqB.jpg 2. Relevant commands, code, scripts, algorithms: .. 3. The attempts at a solution (include all code and scripts): declaring a... (2 Replies)
Discussion started by: guy9050
2 Replies

9. UNIX for Beginners Questions & Answers

Indentation for Lists in html

An writing some html instructions to have text beside an image. The image is located on the left and I want the tect to appear on the right side of the image. The text includes a list. The problem is that the list boxes and not shifted. The text within the list align on the left with the... (20 Replies)
Discussion started by: kristinu
20 Replies

10. UNIX for Beginners Questions & Answers

Cshell if clause indentation

I would like to know if indentation is relevant for Cshell scripts. I wrote my code like this: if ((-e file1) && (-e file2)) then cat file1 > file10 cat file2 > file20 endifUsually I write my if clauses like this: if ((-e file1) && (-e file2)) then cat file1 > file10 ... (1 Reply)
Discussion started by: maya3
1 Replies
SETTERM(1)							   User Commands							SETTERM(1)

NAME
setterm - set terminal attributes SYNOPSIS
setterm [options] DESCRIPTION
setterm writes to standard output a character string that will invoke the specified terminal capabilities. Where possible terminfo is con- sulted to find the string to use. Some options however (marked "virtual consoles only" below) do not correspond to a terminfo(5) capabil- ity. In this case, if the terminal type is "con" or "linux" the string that invokes the specified capabilities on the PC Minix virtual console driver is output. Options that are not implemented by the terminal are ignored. OPTIONS
For boolean options (on or off), the default is on. For conciseness, an 8-color below is black, red, green, yellow, blue, magenta, cyan, or white. A 16-color is an 8-color, grey, or bright followed by red, green, yellow, blue, magenta, cyan, or white. The various color options may be set independently, at least at virtual consoles, though the results of setting multiple modes (for exam- ple, -underline and -half-bright) are hardware-dependent. -appcursorkeys [on|off] (virtual consoles only) Sets Cursor Key Application Mode on or off. When on, ESC O A, ESC O B, etc. will be sent for the cursor keys instead of ESC [ A, ESC [ B, etc. See the "vi and Cursor-Keys" section of the Text-Terminal-HOWTO for how this can cause problems for vi users. -append [1-NR_CONS] Like -dump, but appends to the snapshot file instead of overwriting it. Only works if no -dump options are given. -background 8-color|default (virtual consoles only) Sets the background text color. -blank [0-60|force|poke] (virtual consoles only) Sets the interval of inactivity, in minutes, after which the screen will be automatically blanked (using APM if available). Without an argument, gets the blank status (returns which vt was blanked or zero for unblanked vt). The force option keeps screen blank even if a key is pressed. The poke option unblank the screen. -bfreq [freqnumber] Sets the bell frequency in Hz. Without an argument, defaults to 0. -blength [0-2000] Sets the bell duration in milliseconds. Without an argument, defaults to 0. -blink [on|off] Turns blink mode on or off. Except at a virtual console, -blink off turns off all attributes (bold, half-brightness, blink, reverse). -bold [on|off] Turns bold (extra bright) mode on or off. Except at a virtual console, -bold off turns off all attributes (bold, half-brightness, blink, reverse). -clear [all] Clears the screen and "homes" the cursor, as clear(1). -clear rest Clears from the current cursor position to the end of the screen. -clrtabs [tab1 tab2 tab3 ...] (virtual consoles only) Clears tab stops from the given horizontal cursor positions, in the range 1-160. Without arguments, clears all tab stops. -cursor [on|off] Turns the terminal's cursor on or off. -default Sets the terminal's rendering options to the default values. -dump [1-NR_CONS] Writes a snapshot of the given virtual console (with attributes) to the file specified in the -file option, overwriting its con- tents; the default is screen.dump. Without an argument, dumps the current virtual console. Overrides -append. -append [1-NR_CONS] Like -dump, but appends to the snapshot file instead of overwriting it. Only works if no -dump options are given. -file dumpfilename Sets the snapshot file name for any -dump or -append options on the same command line. If this option is not present, the default is screen.dump in the current directory. A path name that exceeds system maximum will be truncated, see PATH_MAX from linux/lim- its.h for the value. -msg [on|off] (virtual consoles only) Enables or disables the sending of kernel printk() messages to the console. -msglevel 1-8 (virtual consoles only) Sets the console logging level for kernel printk() messages. All messages strictly more important than this will be printed, so a logging level of 0 has the same effect as -msg on and a logging level of 8 will print all kernel messages. klogd(8) may be a more convenient interface to the logging of kernel messages. -powerdown [0-60] Sets the VESA powerdown interval in minutes. Without an argument, defaults to 0 (disable powerdown). If the console is blanked or the monitor is in suspend mode, then the monitor will go into vsync suspend mode or powerdown mode respectively after this period of time has elapsed. -underline [on|off] Turns underline mode on or off (see -ulcolor). -powersave [off] Turns off monitor VESA powersaving features. -powersave on|vsync Puts the monitor into VESA vsync suspend mode. -powersave powerdown Puts the monitor into VESA powerdown mode. -powersave hsync Puts the monitor into VESA hsync suspend mode. -regtabs [1-160] (virtual consoles only) Clears all tab stops, then sets a regular tab stop pattern, with one tab every specified number of positions. Without an argument, defaults to 8. -repeat [on|off] (virtual consoles only) Turns keyboard repeat on or off. -reset Displays the terminal reset string, which typically resets the terminal to its power on state. -reverse [on|off] Turns reverse video mode on or off. Except at a virtual console, -reverse off turns off all attributes (bold, half-brightness, blink, reverse). -store (virtual consoles only) Stores the terminal's current rendering options (foreground and background colors) as the values to be used at reset-to-default. -tabs [tab1 tab2 tab3 ...] (virtual consoles only) Sets tab stops at the given horizontal cursor positions, in the range 1-160. Without arguments, shows the current tab stop set- tings. -term terminal_name Overrides the TERM environment variable. -ulcolor 16-color (virtual consoles only) Sets the color for underlined characters. -version Output version information and exit. -help Output help screen and exit. SEE ALSO
tput(1), stty(1), terminfo(5), tty(4) BUGS
Differences between the Minix and Linux versions are not documented. AVAILABILITY
The setterm command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. util-linux January 2000 SETTERM(1)
All times are GMT -4. The time now is 09:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy