Sponsored Content
Top Forums Shell Programming and Scripting Converting line output to column based output Post 302406742 by npatwardhan on Tuesday 23rd of March 2010 07:17:31 PM
Old 03-23-2010
Ok I found out what was happening. The original text file had a (space) on every blank line that was messing up the order. I removed the spaces and it worked just fine.

Thanks.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Converting gettimeoftheday output to string

Hi .. is there a way i can retrieve the output of gettimeoftheday in a string (1 Reply)
Discussion started by: p_aishwarya
1 Replies

2. Shell Programming and Scripting

how to make a line BLINKING in output and also how to increase font size in output

how to make a line BLINKING in output and also how to increase font size in output suppose in run a.sh script inside echo "hello world " i want that this should blink in the output and also the font size of hello world should be big .. could you please help me out in this (3 Replies)
Discussion started by: mail2sant
3 Replies

3. Shell Programming and Scripting

Converting to columnar output

Hi All, I need some help in script or awk to create a textfile. I have a directory where two subdirectories exists say A and B. Now I need to write a ".txt" file with well arranged(space wraped) three columns in it with the data as follows: 1st column:Serial number(which will increment... (4 Replies)
Discussion started by: Sreejith_VK
4 Replies

4. Shell Programming and Scripting

top output for six processes with the same name, output changed from column to row

Hi, I have a system under test, and I use a script that does a ps. The output, is in the following format, it's basically the timestamp, followed by the rss and vsize. 09:03:57 68404 183656 68312 181944 69860 217360 67536 182564 69072 183172 69032 199276 09:04:27 68752 183292 70000 189020... (5 Replies)
Discussion started by: Bloke
5 Replies

5. Shell Programming and Scripting

"Join" or "Merge" more than 2 files into single output based on common key (column)

Hi All, I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations: 1. I am restrained to 2 input files only. 2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies

6. Shell Programming and Scripting

Find in first column and replace the line with Awk, and output new file

Find in first column and replace the line with Awk, and output new file File1.txt"2011-11-02","Georgia","Atlanta","x","","" "2011-11-03","California","Los Angeles","x","","" "2011-11-04","Georgia","Atlanta","x","x","x" "2011-11-05","Georgia","Atlanta","x","x","" ... (4 Replies)
Discussion started by: charles33
4 Replies

7. Shell Programming and Scripting

Need help converting df output to gigabytes

I need some help converting the disk space values in kilobytes to gigabytes. I can't use df -h because the report has to be in megabytes for some disk space tracking software the customer is using. I have been playing around with trying to assign variables I can use outside of awk so I can do... (1 Reply)
Discussion started by: kuliksco
1 Replies

8. Shell Programming and Scripting

Read in 2-column CSV, output many files based on field

Is there a way to read in a two-columned CSV file, and based on the fields in 1st column, output many different files? The input/output looks something like: input.csv: call Call Mom. call Call T-Mobile. go Go home. go Go to school. go Go to gas station. play Play music. play Play... (4 Replies)
Discussion started by: pxalpine
4 Replies

9. Ubuntu

Converting Impress output to DVD video

I have a need to convert 'Impress' presentations to DVD video format whilst retaining the original presentation in situ. Copying the individual slides and modifying size etc. in Gimp and then importing them into 'Openshot' is both long winded and the loss of quality is significant. Can anybody... (14 Replies)
Discussion started by: Royalist
14 Replies

10. UNIX for Beginners Questions & Answers

Search a multi-line shell command output and execute logic based on result

The following is a multi-line shell command example: $cargo build Compiling prawn v0.1.0 (/Users/ag/rust/prawn) error: failed to resolve: could not find `setup_panix` in `human_panic` --> src/main.rs:14:22 | 14 | human_panic::setup_panix!(); | ... (2 Replies)
Discussion started by: yogi
2 Replies
VLNA(1) 						      General Commands Manual							   VLNA(1)

NAME
vlna - adds tilde after each non-syllabic preposition USAGE
vlna [options] [filenames] PREFACE
There exists a special Czech and Slovak typographical rule: you cannot leave the non-syllabic preposition on the end of one line and continue writting text on next line. For example, you cannot write down the text "v lese" (in a forest) like "v<new-line>lese". The program vlna adds the asciitilde between such preposition and the next word and removes the space(s) in this place. It means, the program converts "v lese" to "v~lese". You can use this program as a preporcessor before TeXing. Moreower, you can set another sequence to store instead asciitilte (see the -x option). DESCRIPTION
The program vlna processes one or more files, searches the non-syllabic prepositions followed by space(s) in these files and converts this/these space(s) to asciitilde for each such occurrence. In the processed file, the activity of the program can be blocked by %~- sequence and the activity can be restored again by the %~+ sequence. These sequences can include spaces, it means that % ~- is a correct sequence too. The rule to recognize a preposition follows: The arbitrary number of opening parentheses can be written before the preposition and before these (optional) parentheses must be the space, tabelator or new-line. The preposition itself is one-letter word, the letters have to be from this set: {KkSsVvZzOoUuAI}. See the -v option if you want to change this set of letters. From version 1.2, the TeX sequence can be written before preposition and before the brace. Example: "<new-line>([V lese" is converted to "<new-line>([V~lese". Another example: "uv{V lese}" is converted to "uv{V~lese}". One or more blank-spaces have to be included after preposition before next word. The blank-space means space or tabelator. One <new-line> can be here too. All these characters are removed and replaced by asciitilde (or by another string, see -x option). If <new-line> is deleted, another <new-line> is created before preposition (and before optional parentheses) in order to the number of lines is kept unchanged. Example: "... V<new-line><tabelator>lese" is converted to "...<new-line>V~lese". The program checks the consintence of TeX's math environments (if -m option isn't used). For example the "$...$$...$" sequence (it means the display mode switch inside the text-math mode) generates a warning. Empty line inside display mode generates a warning too and the program processes next text like in normal (non-math) mode. The existence of the "$" inside display mode are accepted because the constructions like $$..hbox{..$..$}..$$ are allowed and common. The consistence of verbatim mode is checked on the end of the file. If the file ends but the verbatim mode does not end the warning is printed. This behavior can be switched off by -n or -w options. The program suppresses the tilde changing after letters like prepositions but they are not prepositions because the TeX or LaTeX sequence precedes. Example: "vlastnosti TeX u jsou" is not converted to "vlastnosti TeX u~jsou", because this text is printed (after TeX processing) like "vlastnosti TeXu jsou". The letter "u" is a suffix here, no preposition. OPTIONS
The options are optional and can be written in arbitrarty order separated by space. -f Filter. The [filenames] are treated as follows: vlna -f filename1 filename2 Input is filename1, output is filename2. vlna -f filename1 Input is filename1, output is stdout. vlna -f Input is stdin, output is stdout. vlna filename1 [filename2 [filename3 ...]] If the -f option is omitted then each file is processed independently and it is re-written. -s The silent mode. No messages, warnings, statistics are printed. Only errors which terminates the program untimely are printed. If this parameter is omitted then banner, warnings and statistics are printed to stderr. -r Do not create the backups. The option -r is irrelevant if the -f option is used. If the -f and -r options aren't used then each re- written file is stored with its original contents to a backup file (the name of backup file is the same as filename, only the tilde is used instead of the last character). -v characters The set of characters treated as non-syllabic prepositions is declared by this option. Default: -v KkSsVvZzOoUuAI. The space between -v and characters is required. -x code The code is a string written in hexadecimal notation (even hexa digits is required). This string will be saved after prepositions instead asciitilde which is default. The example: -x C2A0 two bytes are stored after each non-syllabic preposition, first byte has C2 code and second byte has A0 code. This example means that NO-BREAK SPACE in UTF8 encoding will be used after prepositions. Another example: -x 00A0 the NO-BREAK SPACE in UTF16 encoding. Another example: -x 48454C4C4F the string HELLO will be used. The space between -x and code is required. -m The math-modes ($...$ and $$...$$) are ignored. It means that non-syllabic prepositions is searched in math-mode too. Default (without -m option): no changes in math modes are done because (for example) "v" is variable in math-mode, no preposition. -n The verbatim mode (verb<char>...<char>, egtt...endtt) is ignored, it means the program can do a changes in verbatim environment. Default (without -n option): no changes in verbatim mode are done. -l The LaTeX mode. The following environments are treated as display mode: egin{display}...end{display} and egin{equation}...end{equation} and the following environment is treated as verbatim mode: egin{verbatim}...end{verbatim}. -w The web mode (Knuth's web, no www:-). The following sequences are treated as verbatim: @<, @d...@*, @space or @>|. It means program code is unchanged in *.w or *.web files, only web-comments are processed. EXAMPLES
vlna -m -n -s -r file The program has a behavior similar to the old vlnka program. vlna *.tex All files with .tex suffix in current directory will be processed (and possibly changed). (The "*" is UNIX-shell feautre). vlna -f file > /dev/null Only the consistence checking of math and verbatim modes is processed. No changes are done. AUTHORS
Petr Olsak <olsak@math.feld.cvut.cz>. Man page (Czech original) and Makefile is created by Rulolf Cejka March 30 2009 VLNA(1)
All times are GMT -4. The time now is 11:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy