I have a text file like this with hundreds of lines:
>cat file1.txt
1027123000
1027124000
1127125000
1128140000
1228143000
>
all lines are very similar and have exactly 10 digits. I want to separate the digits by twodigit and hyphens....like so,
>
10-27-12-30-00
10-27-12-40-00... (7 Replies)
Hi,
I have a trivial question to ask, I am seeing in some shell scripts the '-' (hyphen) character following the first line of shell script (i.e) the shebang notation as follows:
#!/bin/sh -
#! /bin/bash -
what does the hyphen signify? What will happen if it is not given explicitly? (2 Replies)
I want to check for more than one hyphen and then hold the first one and delete the rest of the hyphen.
I try something like this sed 's/\(*\)\1/\1/' but this doesn't work.
I try something like this sed 's/\(*\)-\1/ \1/g' but here the script delete all the hyphen.
I want to go from this : I... (2 Replies)
Hi,
I have a large number of files which are written as csv (comma-separated values).
Does anyone know of simple sed/awk command do achieve this?
Thanks!
---------- Post updated at 10:59 AM ---------- Previous update was at 10:54 AM ----------
Guess I asked this too soon. Found the... (0 Replies)
Hi Everyone,
On my Linux box I have a text file having block of few lines and this block lines separated by one blank line. I would like to format and print these lines in such a way that this entire block of lines will come as single comma separated line & again next block of lines in next... (7 Replies)
I'm attempting to replace a substring that contains a hyphen and not having much success, can anyone point out where i'm going wrong or suggest an alternative.
# echo /var/lib/libvirt/images/vm888b-clone.qcow | sed -e 's|vm888-clone|qaz|g'
/var/lib/libvirt/images/vm888b-clone.qcow (1 Reply)
Hey guys,
I have a file that is delimited by | and I am trying to write a sed command to
convert this:
abc|def||ghi|jkl||||mnop
into this:
abc|def|-|ghi|jkl|-|-|-|mnop
The output I am getting out of:
sed -e "s/+//g" /tmp/opt.del > /tmp/opt2.del
is like:
... (9 Replies)
I asked this question last month in Stack Exchange (linux - delete directory with leading hyphen - Server Fault) and none of the answers supplied worked.
I have somehow created a directory with a leading hyphen and cannot get rid of it.
# ls -li | grep p
2621441 drwxr-xr-x. 2 root root... (4 Replies)
Discussion started by: edstevens
4 Replies
LEARN ABOUT DEBIAN
sff2g3
sff2g3(1) mgetty+sendfax manual sff2g3(1)NAME
sff2g3 - convert CAPI SFF fax files into G3 fax files
SYNOPSIS
sff2g3 [-r] [-d] [-v] input.SFF output.%03d.g3
DESCRIPTION
Reads a Common ISDN API (CAPI) structured file format (SFF) input file, and converts every fax page contained in it to a raw G3 fax file.
The input SFF files typically come from fax reception programs using CAPI on active ISDN cards (isdn4linux, AVM or DIVA cards) or similar.
The output G3 files are in the ``native'' format that all other G3 utilites in the mgetty+sendfax package use.
If the input file name is ``-'', sff2g3 will read from stdin.
The output file name should contain a ``%d'' or ``%03d'' part. It will be replaced with the current page number. If there is no page num-
ber field, only the last page in the SFF file will be saved.
OPTIONS -r reverse the bit order in the bytes of the output G3 file. The input bit order is fixed.
-d will one day make sff2g3 prepend a digifax header to the page.
-v verbose mode - show what's going on. Multiple -v arguments increase debug output level.
REFERENCES
The standard for Group 3 fax is defined in CCITT Recommendation T.4. The SFF file format is specified in the CAPI specs
(http://www.capi.org).
BUGS
The -d option isn't implemented yet.
The output file name is not yet robust against format string attacks.
SEE ALSO g32pbm(1), pbm(5)AUTHOR
sff2g3 is Copyright (C) 2004 by Gert Doering, <gert@greenie.muc.de>.
greenie 17 Jul 04 sff2g3(1)