Sponsored Content
Top Forums Shell Programming and Scripting How To Add Numeric Data of A file Post 302110971 by Perderabo on Saturday 17th of March 2007 02:33:00 AM
Old 03-17-2007
Code:
$ cat data
10
39
53
05
37
54
$ awk '{ t=t+$1 } END {print "total = ", t}' data
total =  198
$

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to check a column contain numeric or char data type ??

I have a file called clientname_filename.csv whose contents are like col1|col2|col3|col4| 510|abc|xxx|450| 510|abc11|yyy|350 510|pqr99|zzz| 670 512|222|439|110 Here i have check the contents of column for data type. i have a constraints that col1 always contain Numeric value column 2... (12 Replies)
Discussion started by: jambesh
12 Replies

2. Shell Programming and Scripting

Perl code to differentiate numeric and non-numeric input

Hi All, Is there any code in Perl which can differentiate between numeric and non-numeric input? (11 Replies)
Discussion started by: Raynon
11 Replies

3. Shell Programming and Scripting

add data into a file

I have a csv file, i need to insert data into csv file at row 6 If row 6 in csv file is emplty then i need to enter s23, if row 6 in csv file has some value in it then i don't have to do any thing. and i have 100 csv files and and each csv files has 45000 rows of data in it. (1 Reply)
Discussion started by: gaddamshashank
1 Replies

4. UNIX for Dummies Questions & Answers

Find and Replace random numeric value with non-numeric value

Can someone tell me how to change the first column in a very large 17k line file from a random 10 digit numeric value to a non numeric value. The format of lines in the file is: 1702938475,SNU022,201004 the first 10 numbers always begin with 170 (6 Replies)
Discussion started by: Bahf1s
6 Replies

5. Shell Programming and Scripting

Perl script to sort data on second numeric field

Hi, I'm a learner of PERL programming. I've a input file with the below data: SWAT_5, 1703, 2010-09-21 SWAT_6, 2345, 2010-09-21 SWAT_7, 1792, 2010-09-21 SWAT_8, 1662, 2010-09-21 SWAT_9, 1888, 2010-09-21 VXHARP_1, 171, 2010-09-21 I need to sort this data based on the second... (6 Replies)
Discussion started by: ganapati
6 Replies

6. Shell Programming and Scripting

add more data to existing data in a file

Hi all, I need help to add additional data from file2 to existing data in file 1 using awk, sed or perl. the ID in file 1 should match against field $3 in file2 file1 #this is a new game ID HR_1 BASE1 30 BASE2 37 DETAIL No TYPE L @@ ID HR_10 BASE1 6030 BASE2 ... (4 Replies)
Discussion started by: redse171
4 Replies

7. Shell Programming and Scripting

create txt file form data file and add some line on it

Hi Guys, I have file A.txt File A Data AK1521 AK2536 AK3164 I want create text file of all data above and write some data on each file. want Output on below folder /home/kka/out AK1521.txt Hi Welocme (3 Replies)
Discussion started by: asavaliya
3 Replies

8. Shell Programming and Scripting

Add edited numeric strings in awk

I am using awk to sum up all amounts and at end print total. input: 10,250.00 20,103.15 expected output: 30353.15 code: {subtot=+$1} END{print subtot} The problem I encounter is it stops at commas and returns 30 as answer And if I use this code: {subtot=($1+0);subtot=+$1}... (9 Replies)
Discussion started by: paresh n doshi
9 Replies

9. Shell Programming and Scripting

Help with add existing file name as new data column in new output file

Input File 1 cat S1.txt MI0043 2731 miR-1 Input File 2 cat S4.txt MI006 310 CiR-1 MI057 10 CiR-24 MI750 5 CiR-24 Desired Output File 1 cat S1.txt.out MI0043 2731 miR-1 S1.txt Desired Output File 2 cat S4.txt.out MI006 310 CiR-1 S4.txt (3 Replies)
Discussion started by: perl_beginner
3 Replies

10. Shell Programming and Scripting

Need to add a numeric & special char to end of the first line

Need to add a numeric & special char to end of the first line Existing file: 12-11-16|11 2016 Jan 12:34:55|03:55| 13-10-16|10 2016 Jan 12:34:55|03:55|12-11-16|11 2016 Jan 12:34:55|03:55| 14-10-16|19 2016 Jan 12:34:55|03:55|13-11-16|11 2016 Jan 12:34:55|04:55| 15-10-16|18 2016 Jan... (11 Replies)
Discussion started by: Joselouis
11 Replies
SUBTLER(1)																SUBTLER(1)

NAME
subtler - a commandline interface for subtle SYNOPSIS
subtler [GENERIC|MODIFIER] GROUP ACTION [ARG1] [ARG2] DESCRIPTION
subtler is a commandline tool, that allows interacting with a EWMH/NetWM compatible window manager and especially with subtle(1) from a shell. The arguments of subtler are quite complex and allow a variety of spellings and different number of arguments. Most of the commands require at least one argument and return output of following format: FORMAT
INPUT
o DISPLAY :<display number> o ID <number> o GEOMETRY <x>x<y>+<width>+<height> o NAME <string|number> o DATA <string|number> o PATTERN Matching works either via plaintext, regex(7), id or window id if applicable. If a pattern matches more than once ALL matches are used. If the PATTERN is - subtler will read from stdin. OUTPUT
o Client listing <window id> <visibility> <view id> <geometry> <gravity> <flags> <instance name> (<class name>) o Gravity listing <gravity id> <geometry> o Screen listing <screen id> <geometry> o Tag listing <tag name> o Tray listing <window id> <instance name> (<class name>) o View listing <window id> <visibility> <view id> <view name> FIELDS
o <window id> Numeric (hex) id (e.g. 0xa00009) o <visibility> - = not visible, * = visible o <view id> Numeric id (e.g. 5) o <geometry> x x y + width + height o <flags> - = not set, + = fullscreen, ^ = float, * = stick, ~ = resize, = = zaphod, ! = fixed o <instance name> Window instance/resource name o <class name> Window class name o <gravity id> Numeric id of gravity (e.g. 2) o <screen id> Numeric id of a screen (e.g. 1) o <tag name> Name of a tag (e.g. terms) OPTIONS
GENERIC
o -d, --display=DISPLAY Connect to DISPLAY (default: :0) o -h, --help Show this help and exit o -V, --version Show version info and exit o -p, --proc This creates a ruby proc from the given argument and yields the result of the group to it as parameter param. Examples: subtler -cl -p "puts param.name" subtler -cC -p "param.gravity = { terms: :left }" MODIFIER
o -r, --reload Reload subtle o -R, --restart Restart subtle o -q, --quit Quit subtle o -C, --current Select current active window/view instead of passing it via argument. Example: subtler -cCf o -X, --select Select a window via pointer instead of passing it via argument. Example: subtler -cXf GROUPS
o -c, --Client Use client group o -g, --Gravity Use gravity group o -e, --Screen Use screen group o -s, --Sublet Use sublet group o -t, --Tag Use tag group o -y, --Tray Use tray group o -v, --View Use views group ACTIONS FOR CLIENTS
o -f, --find => PATTERN Find client Example: subtler -cf urxvt o -o, --focus => PATTERN Set focus to client Example: subtler -co urxvt o -F, --full => PATTERN Toggle full Example: subtler -cF urxvt o -O, --float => PATTERN Toggle float Example: subtler -cO urxvt o -S, --stick => PATTERN Toggle stick Example: subtler -cS urxvt o -N, --urgent => PATTERN Toggle urgent Example: subtler -cN urxvt o -l, --list List all clients o -T, --tag => PATTERN Add tag to client Example: subtler -cT urxvt tag o -U, --untag => PATTERN NAME Remove tag from client Example: subtler -cU urxvt tag o -G, --tags => PATTERN Show client tags Example: subtler -cG urxvt o -Y, --gravity => PATTERN PATTERN Set client gravity Example: subtler -cY urxvt gravity o -E, --raise => PATTERN Raise client window Example: subtler -cE urxvt o -L, --lower => PATTERN Lower client window Example: subtler -cL urxvt o -k, --kill => PATTERN Kill client Example: subtler -ck urxvt ACTIONS FOR GRAVITIES
o -a, --add => NAME GEOMETRY Create new gravity Example: subtler -ga test 0x0+100+100 o -l, --list List all gravities Example: subtler -gl o -f, --find => PATTERN Find a gravity Example: subtler -gf center o -k, --kill => PATTERN Kill gravity Example: subtler -gk center ACTIONS FOR SCREENS
o -l, --list List all screens Example: subtler -el o -f, --find => ID Find a screen Example: subtler -ef 0 ACTIONS FOR SUBLETS
o -l, --list List all sublets Example: subtler -sl o -f, --find => PATTERN Find sublet Example: subtler -sf sublet o -u, --update Updates value of sublet Example: subtler -su o -D, --data => PATTERN DATA Send data to sublet Example: subtler -sD sublet something o -k, --kill => PATTERN Kill sublet Example: subtler -sk PATTERN ACTIONS FOR TAGS
o -a, --add => NAME Create new tag Example: subtler -ta tag o -f, --find => PATTERN Find all clients/views by tag Example: subtler -ta tag o -l, --list List all tags Example: subtler -tl o -I, --clients Show clients with tag Example: subtler -tI o -k, --kill => PATTERN Kill tag Example: subtler -tk PATTERN ACTIONS FOR TRAYS
o -f, --find => PATTERN Find a tray Example: subtler -yf PATTERN o -l, --list List all trays Example: subtler -yl o -k, --kill => PATTERN Kill tray Example: subtler -yk PATTERN ACTIONS FOR VIEWS
o -a, --add => NAME Create new view Example: subtler -va NAME o -f, --find => PATTERN Find a view Example: subtler -vf PATTERN o -l, --list List all views Example: subtler -vl o -T, --tag => PATTERN NAME Add tag to view Example: subtler -vT terms tag o -U, --untag => PATTERN NAME Remove tag from view Example: subtler -vT terms tag o -G, --tags Show view tags Example: subtler -vG terms o -I, --clients Show clients on view Example: subtler -vI terms o -k, --kill => PATTERN Kill view Example: subtler -vk terms BUGS
Report bugs at http://subforge.org/projects/subtle/issues Homepage: http://subtle.subforge.org COPYRIGHT
Copyright (c) Christoph Kappel <unexist@subforge.org> SEE ALSO
subtle(1), subtlext(1), sur(1), surserver(1) November 2011 SUBTLER(1)
All times are GMT -4. The time now is 07:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy