12-31-2009
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a txt file called a.txt which contain over 10,000 records and I would like to remove space before comma or after comma....like below:
The input (for example two record 00001,00002):
00001,client,card limited ,02292,N ,162:41 , 192, ... (6 Replies)
Discussion started by: happyv
6 Replies
2. UNIX for Dummies Questions & Answers
How do I deal with extracting a portion of a record when multiple field separators are involved.
Let's say I have:
Mike Harrington;(555) 555-5555:250:100:175
Christian Dobbins;(555) 555-2358:155:90:201
Susan Dalsass;(555) 555-6279:250:60:50
Archie McNichol;(555) 555-1348:250:100:175
Jody... (3 Replies)
Discussion started by: doubleminus
3 Replies
3. Shell Programming and Scripting
Hi guys,
I want to automate a few tasks. For one of them, I need to get the output of a command and parse it to extract information I need: drbdadm create-md drbd0
The output is:
md_offset 48010952704
al_offset 48010919936
bm_offset 48009453568
Found ext2 filesystem which uses... (2 Replies)
Discussion started by: alirezan
2 Replies
4. Shell Programming and Scripting
Hi,
I have a problem where some of the records I need to process have the first address field as something like "10Walpole Street" where obviously I want it to be "10 Walpole Street". I know I need to somehow separate out the integer and probably form a new string variable, but I just don't... (5 Replies)
Discussion started by: jonathanm
5 Replies
5. Shell Programming and Scripting
Hi Unix Gurus,
I have a file with 100,000 lines with lines in the format:
1,35518,35518,1,2,1,72,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253888723-g 1253889445
1,78973,78973,1,2,2,91,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253888723-g 1253889445... (3 Replies)
Discussion started by: toms
3 Replies
6. Shell Programming and Scripting
I have a text file like this
...
B 16 1.340E+05
A 18 3.083E+02
Wu123 1.365E+02
...
I would like to get rid of the 7th character of each line if this is a space character.
Thank you,
Sarah (5 Replies)
Discussion started by: f_o_555
5 Replies
7. Shell Programming and Scripting
Hi,
Consider the data (FS = |):
1| England |end
2| New Zealand |end
3|Australia|end
4| Some Made Up Country |end
5| West Indies|end
I want the output to be (i.e. without the leading and trailing white space from $2)
England
New Zealand
Australia
Some Made Up Country
West... (4 Replies)
Discussion started by: Storms
4 Replies
8. Shell Programming and Scripting
echo 0.633588 1875 | awk '{print $1 * $2 * 1024}'
is there a better way to run the above command? it keeps printing out in notation and i do not want that at all.
when i run the above, i get:
1.21649e+06
OS: linux
language:bash (1 Reply)
Discussion started by: SkySmart
1 Replies
9. Shell Programming and Scripting
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
10. Shell Programming and Scripting
hi,
I'm trying to calculate IP addresses and their respective calls to our apache Server. The standard format of the input is
HOST IP DATE/TIME - - "GET/POST reuest" "User Agent"
HOST IP DATE/TIME - - "GET/POST reuest" "User Agent"
HOST IP DATE/TIME - - "GET/POST reuest" "User Agent"
HOST... (2 Replies)
Discussion started by: busyboy
2 Replies
LEARN ABOUT DEBIAN
ns_fmttime
ns_time(3aolserver) AOLserver Built-In Commands ns_time(3aolserver)
__________________________________________________________________________________________________________________________________________________
NAME
ns_time, ns_fmttime, ns_gmtime, ns_localtime, - commands
SYNOPSIS
ns_fmttime time ?format string?
ns_gmtime
ns_localtime
ns_time
_________________________________________________________________
DESCRIPTION
ns_time: Returns the value of time in seconds since 00:00:00 UTC, January 1, 1970. This return value is suitable as input to the ns_http-
time function to get the current time.
ns_fmttime: Formats the time string,time,according to the format provided in format string. If no format is provided, defaults to "%a %b %e
%H:%M:%S %Z %Y".
ns_gmttime: Returns a Tcl list of the pieces of the current Greenwich Mean Time. The pieces are
seconds (0-59)
minutes (0-59)
hours (0-23)
dayofmonth (1-31)
monthofyear (0-11)
year (year-1900)*
dayofweek (Sunday=0)
dayofyear (0-365)
1 if Daylight Savings Time is in effect
ns_localtime: Returns a Tcl list of the pieces of the current local time. The pieces are
seconds (0-59)
minutes (0-59)
hours (0-23)
dayofmonth (1-31)
monthofyear (0-11)
year (year-1900)*
dayofweek (Sunday=0)
dayofyear (0-365)
1 if Daylight Savings Time is in effect
EXAMPLES
ns_fmttime [ns_time] returns: Tue Nov 12 15:14:47 2002 ns_fmttime [ns_time] "%Y%m%d" returns: 20021112
SEE ALSO
ns_httptime
KEYWORDS
AOLserver 4.0 ns_time(3aolserver)