Hi,
I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value .
For Eg .
if the input file has a row :
abc xyz lmn 89 lm nk o p
I would like the script to create something like... (9 Replies)
How can you delete a row if a certain column is bigger than a certain number?
I have the following input:
20080709 20081222 95750 1 0 0.02 94.88
20080709 20081222 95750 2 0 0.89 94.88
20080709 20081222 9575 1 0 0 94.88
20080709 20081222 9575 2 0 0 94.88
20080709 20081222 9587.5 1 0 0... (1 Reply)
How can you delete a row if a certain column is bigger than a certain number?
I have the following input:
20080709 20081222 95750 1 0 0.02 94.88
20080709 20081222 95750 2 0 0.89 94.88
20080709 20081222 9575 1 0 0 94.88
20080709 20081222 9575 2 0 0 94.88
20080709 20081222 9587.5 1 0 0... (6 Replies)
This is the source file, we called it errorlist.out
196 server_a server_unix_2 CD
196 server_b server_win_1 CD
196 server_c server_win_2 CD
196 server_bd server_unix_2 CD
196 server_d server_unix_2 CD
196 server_es server_win_1 CD
196 ... (14 Replies)
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Hi,
I would like to add a new column containing the row numbers to a text file. How do I go about doing that? Thanks!
Example input:
A X
B Y
C D
Output:
A X 1
B Y 2
C D 3 (5 Replies)
Hi everyone,
I have a data file in which the data is stored in event blocks. What I would like to get is that the same file with every data row starting with the number of event block. So here is two event blocks from my file:
<event>
-2 -1 0 0 0 501 0.00000000000E+00
... (2 Replies)
Hi,
i have a raw output file like this
167,63.50
167,63.50
168,63.68
166,63.68
168,63.68
I would like to add every each N rows (for example 60) and in a third column , a timestamp using the command date +"%H:%M"how can i do it with one single command ?
Thank you !! (5 Replies)
I want to split this with every 5 or 50 depend on how much data the file will have. And remove the comma on the end
Source file will have
001,0002,0003,004,005,0006,0007,007A,007B,007C,007E,007F,008A,008C
Need Output from every 5 tab and remove the comma from end of each row
... (4 Replies)
Discussion started by: ranjancom2000
4 Replies
LEARN ABOUT OSX
setfile
SETFILE(1) BSD General Commands Manual SETFILE(1)NAME
/usr/bin/SetFile -- set attributes of files and directories
SYNOPSIS
/usr/bin/SetFile [-P] [-a attributes] [-c creator] [-d date] [-m date] [-t type] file ...
DESCRIPTION
/usr/bin/SetFile is a tool to set the file attributes on files in an HFS+ directory. It attempts to be similar to the setfile command in MPW.
It can apply rules to more than one file with the options applying to all files listed.
Flags:
-P Acts on a symlink file instead on the file the symlink resolves to.
-a attributes Sets the file attributes bits where attributes is a string of case sensitive letters. Each letter corresponds to a file
attribute: an uppercase letter indicates that the attribute bit is set (1), a lowercase letter indicates that it is not (0).
Note: attributes not specified remain unchanged.
A | a Alias file
B | b Has bundle
C | c Custom icon (allowed on folders)
D | d Located on the desktop (allowed on folders)
E | e Extension is hidden (allowed on folders)
I | i Inited - Finder is aware of this file and has given it a location in a window. (allowed on folders)
L | l Locked
M | m Shared (can run multiple times)
N | n File has no INIT resource
S | s System file (name locked)
T | t "Stationery Pad" file
V | v Invisible (allowed on folders)
Z | z Busy (allowed on folders)
-c creator Specifies the file's creator, where creator can be a string of four MacRoman characters, an empty string ('') designating a
null creator, or a binary, decimal, octal, or hexadecimal number in standard notation (e.g. 0x52486368).
-d date Sets the creation date, where date is a string of the form: "mm/dd/[yy]yy [hh:mm:[:ss] [AM | PM]]" Notes: Enclose the string
in quotation marks if it contains spaces. The date must be in the Unix epoch, that is, between 1/1/1970 and 1/18/2038. If the
year is provided as a two-digit year, it is assumed to be in the 21st century and must be from 00 (2000) through 38 (2038).
-m date Sets the modification date where date is a string of the form in -d above. (mm/dd/[yy]yy [hh:mm:[:ss] [AM | PM]])
-t type Sets the file type, where type can be a string of four MacRoman characters, an empty string ('') designating a null type, or a
binary, decimal, octal, or hexadecimal number in standard notation (e.g. 0x55455955).
RETURN VALUES
0 attributes set
1 syntax error
2 any other error
SEE ALSO GetFileInfo(1)EXAMPLES
This command line sets the modification date of "myFile":
SetFile -m "8/4/2001 16:13" myFile
Mac OS X January 4, 2009 Mac OS X