I'm currently digging for a way to append a line to a text file where each line begins with the word "setmqaut". This is a continuation of my IBM MQSeries backup script I'm working on to make my life a little easier.
What I would like to do is have each line that looks like this:
setmqaut -m... (4 Replies)
Hi
Is there any command where we can insert a line "2|||" before every line starting with "3|"
my input is as follows
1|ETG|12345
3|79.58|||GBP||
1|ETG|12345
3|79.58|||GBP||
1|ETG|12345
2|EN_GB||Electrogalvanize 0.5 m2 ( Renault )
1|ETG|12345
3|88.51|||GBP||
desired output... (10 Replies)
STEP 1
# Set variable
FILE=/tmp/mainfile
SEARCHFILE =/tmp/searchfile
# THIS IS THE MAIN FILE.
cat /tmp/mainfile
Interface Ethernet0/0 "outside", is up, line protocol is up
Hardware is i82546GB rev03, BW 100 Mbps
Full-Duplex(Full-duplex), 100 Mbps(100 Mbps)
MAC address... (6 Replies)
I have a file that I need to read each line and see if the line begins with a certain keyword. I can't seem to find something that works.
#!/bin/ksh
#
while read i
do
if ]
then
echo "SE2 WORKS"
elif ]
then
echo "CISCO1 WORKS"
fi
done < tmp/diff
The file looks something like
SE1
SE2... (2 Replies)
I need some help. I have a file (all.txt) whereby I want to substitute using sed/awk all lines that matches an expression with another line with different expression i.e
subtitute expression,
database_id: filename;
WITH
database_id: PY;
There are many occurrences of the expression... (4 Replies)
I'm using sh on hp-ux and want to find / print a line that matches 132.101- and the next line, too. grep -A isn't supported on hp-ux, so I'm trying awk and sed.
The code below works but only prints the first occurence. I need all matches from the file.
awk... (2 Replies)
Good day,
I have a list of regular expressions in file1. For each match in file2, print the containing line and the line after.
file1:
file2:
Output:
I can match a regex and print the line and line after
awk '{lines = $0} /Macrosiphum_rosae/ {print lines ; print lines } '
... (1 Reply)
I have a file and when I match the word "initiators" in the first column I need to be able to print the rest of the columns in that row. This is fine for the most part but on occasion the "initiators" line gets wrapped to the next line. Here is a sample of the file.
caw-enabled ... (3 Replies)
Hi
I want to extend following command so that on the basis of "Branch: ****" on the third line I can grep and print name of the file on the first line.
cat .labellog.emd | grep DA2458A7962276A7E040E50A0DC06459 | cut -d " " -f2 | grep -v branch_name | xargs -I file <command to describe> file
... (1 Reply)
Discussion started by: ezee
1 Replies
LEARN ABOUT DEBIAN
kvkcard
KVKCARD(1)KVKCARD(1)NAME
kvkcard - a commandline tool to read information from a German medical card
SYNOPSIS
kvkcard read | daemon | rdvd | rdpd [ [ -v | --verbous ] [ -fFILE | --filename=FILE ] [ -cCARDID | --cardid=CARDID ] [ -b | --beep ] [ -d |
--dosmode ] [ -pPROGRAM | --program=PROGRAM ] [ -aARGUMENTS | --args=ARGUMENTS ] [ -h | --help ] ]
DESCRIPTION
kvkcard is a commandline tool to read information from a German medical card (KVK or eGK).
ARGUMENTS
read Read data from a German medical card.
daemon Wait for insertion of a German medical card and run a program on it.
rdvd Dump RDVD data structure of a card.
rdpd Dump RDPD data structure of a card.
-v | --verbous
Every occurrence of this option increases the verbosity.
-f FILE | --filename=FILE
File to write to. If omitted stdout will be used.
-c CARDID | --cardid=CARDID
Set the ID of the card to read.
-b | --beep
Beep after reading a card.
-d | --dosmode
Output data in DOS mode.
-p PROGRAM | --program=PROGRAM
Program to call on cards found.
-a ARGUMENTS | --args=ARGUMENTS
Arguments for the program to be called
-h | --help
Shows this help.
FILES
/etc/chipcard/
The system-wide configuration files.
/var/log/chipcard/
The default log files.
SEE ALSO
http://www.libchipcard.de
Homepage of libchipcard project.
/usr/share/doc/libchipcard-tools/
Local documentation.
REVISION Manual for kvkcard 2009 March 19th KVKCARD(1)