Sponsored Content
Top Forums Shell Programming and Scripting Aligning columns in a text file using Perl Post 302620365 by smarty86 on Sunday 8th of April 2012 02:56:06 AM
Old 04-08-2012
Thanks buddy working as expected... thanks again.. u guys are very helpful Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to convert text to columns in tab delimited text file

Hello Gurus, I have a text file containing nearly 12,000 tab delimited characters with 4000 rows. If the file size is small, excel can convert the text into coloumns. However, the file that I have is very big. Can some body help me in solving this problem? The input file example, ... (6 Replies)
Discussion started by: Unilearn
6 Replies

2. Shell Programming and Scripting

Aligning text files by max field length

Hello, Is there anyway that I can align a pipe delimited text file by the maxium field length where the field is separated out by pipes for large text files with more than 100,000 rows? So, far I have searched other forums and google about aligning text files in unix and I have noticed that... (7 Replies)
Discussion started by: physalis2099
7 Replies

3. Shell Programming and Scripting

Aligning numbers in the second file based on first file

Hi All, I have two sets of files with names .dat and .txt. The number of files is really large more than 90000. The files have names like 1.dat, 2.dat,3.dat and so on where as txt files have names like 1.txt, 2.txt, 3.txt and so on The DAT and TXT files are equal in number. About 90000 each ... (4 Replies)
Discussion started by: shoaibjameel123
4 Replies

4. UNIX for Dummies Questions & Answers

Removing columns from a text file that do not have any values in second and third columns

I have a text file that has three columns. But at the end of the text file, there are trailing lines that have missing second and third columns: 4 0.04972604 KLHL28 4 0.0497332 CSTB 4 0.04979822 AIF1 4 0.04983331 DECR2 4 0.04990344 KATNB1 4 4 4 4 How can I remove the trailing... (3 Replies)
Discussion started by: evelibertine
3 Replies

5. UNIX for Dummies Questions & Answers

Perl - adding columns to file

I have a file in which I need to add more columns to based on a key in the first file: File1 key1,abc,123, key2,def,456, key3,ghi,789, File2 key2,zyx,111,qqq, key3,yuu,222,www, key1,pui,333,eee, key4,xxx,999,rrr, I would like to create the following output: Output (1 Reply)
Discussion started by: WongSifu
1 Replies

6. UNIX for Dummies Questions & Answers

Help with Aligning the content of a txt file

Hello friends Please help me to display the content of a file in specific aligned manner. for ex. the content of the file may be >$TEST WELCOME HI HELLO UNIX SHELL SCRIPTING >$ I want to display the content like . TEST WELCOME HI HELLO ... (18 Replies)
Discussion started by: rajmohan146
18 Replies

7. Shell Programming and Scripting

Replace text in column1 of a file matching columns of another file

Hi all, I have 2 files: species-names.txt Abaca-bunchy-top-virus ((((Abaca-bunchy-top-virus((Babuvirus((Unassigned((Nanoviridae((Unassigned)))) Abutilon-mosaic-virus ((((Abutilon-mosaic-virus((Begomovirus((Unassigned((Geminiviridae((Unassigned))))... (2 Replies)
Discussion started by: thienxho
2 Replies

8. Shell Programming and Scripting

How to concatenate 2-columns by 2 -columns for a text file?

Hello, I want to concatenate 2-columns by 2-columns separated by colon. How can I do so? For example, I have a text file containing 6 columns separated by tab. I want to concatenate column 1 and 2; column 3 and 4; column 5 and 6, respectively, and put a colon in between. input file: 1 0 0 1... (10 Replies)
Discussion started by: huiyee1
10 Replies

9. Shell Programming and Scripting

Perl syntax for formatting columns and text

Dear all, Pzl let me know what is the syntax for converting the columns format to text as i have lots of values for but when i put these values in xls sheet the values are automatically converted to and one more question i have is how to call values from shell script into perl script eg. ... (3 Replies)
Discussion started by: sagar_1986
3 Replies

10. Shell Programming and Scripting

Aligning a file

I have a large text file in following format cat input.txt abc qwert qwer afweferf wdfwefwe ==> kjhjkwdd mnmn ==> jkjkjwekj poiu ==> lklklke tytyutut ==> olkjmnsmn I need to align those lines with the characters " ==>" . I dont want to disturb the lines which dont have "==>". The... (6 Replies)
Discussion started by: ctrld
6 Replies
wuzzah(1)							      Wuzzah?								 wuzzah(1)

NAME
wuzzah - keep an eye out for friends on a local system SYNOPSIS
wuzzah [OPTIONS...] DESCRIPTION
wuzzah is a program that just sits around and scans the utmpx entries to watch when your friends log in and out. By default upon invoca- tion, wuzzah looks for the file ${HOME}/.wuzzah, and loads the list of buddies contained therein (which are separated by newlines), and then sits and watches. If no file is found, and no other readable file is specified (see OPTIONS), wuzzah will attempt to just watch for whomever the current uid maps, and failing that will just quit. OPTIONS
-h, --help an informative usage summary, though nothing you don't see here... -a, --all-users watches for all users on the system, period. -c, --exec-cmd=CMD execute CMD upon a login. NOTE: this is done with a call to system(2), so you can do things like piping and whatever else you can do with sh -c -f, --buddy-file=FILE use FILE as buddyfile. naturally FILE must be readable, and consists of usernames, one to a line. optionally, these usernames can be followed by a colon, and then a wuzzah command-line to override wuzzah's behavior for this specific user. -F, --no-buddyfile tells wuzzah to not bother loading any config files. -i, --interval=NUM sleep NUM seconds between each polling -m, --message=STRING use STRING as a message template to greet logged-in buddies. See the section FORMATS for more information. -n, --no-newline don't end the messages with newlines (normally does by default) -o, --process-once scan the login records once, then exit -p, --process-current by default wuzzah doesn't message users who were already logged in when started up. this option overrides such behavior and mes- sages them anyways (only useful with the -w/-c options) -q, --silent don't message buddies when they log in (default). -s, --status-message=STRING use STRING as a template for displaying the status of people logging in and out. See FORMATS for more information. -u, --users=LIST adds every user in LIST (a space/comma/colon separated list of users) to the buddy list -v, --version the current version and copyright. -w, --write-buddies turns on messaging of buddies as they log in. NOTE: this can get quite annoying rather quickly. tune in soon for a less annoying solution FORMATS
message templates can be defined as normal character strings, interspersed with special format characters. format characters consist of a `%', followed by a character, which defines situation-specific data. The current list of these characters is as follows: a the alert character ('a') b the name of the buddy who has logged in/out d the date, currently in HH:MM:SS format h and H the remote hostname or IP address (respectively) of your buddy's login l the line in/out on which the buddy is logged (typically, something like /dev/pts/9 or /dev/ttyS0) m whether or not you have just messaged your buddy (really only useful for the -s option) n an embedded newline character o your buddy's online status ("logged on" or "logged off") u your own username, as can best be determined by the program. EXAMPLES
a simple invocation: username@machine$ wuzzah (13:45:39) foo logged in on :0 (not messaging). (13:45:39) bar logged in on pts/11 (not messaging). Message from username@machine on pts/11 at 14:00 ... (wuzzah) username says: "shoutout to my homie foo." EOF an example with a little more user customization: username@machine$ wuzzah --message="hey, %b, it's %u. nice to see you at %d!" and when foo logs in, foo will get a message like so: Message from username@machine on pts/11 at 14:00 ... hey, foo, it's username. nice to see you at (14:00:00)! EOF FILES
$HOME/.wuzzah the default file containing the list of users to watch BUGS
don't know of any, but reports (and patches too) are always welcome. feel free to send them to the author. AUTHOR
sean finney <seanius@seanius.net> sean finney Sun Nov 17 02:41:45 EST 2002 wuzzah(1)
All times are GMT -4. The time now is 10:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy