Script 1
Pre-requisites
Create a file with x amount of lines in it, the content of your choice.
Write a script that takes two arguments. The first being a line of text, the second being your newly created file. The script should take the first argument and insert it into the very top (the... (3 Replies)
i want to add a string in a very top of a file without using VI or SED or AWK
this is what ive done:
(echo '0a'; echo 'LINE OF TEXT'; echo '.'; echo 'wq') | ed -s myfile
to add astrng right in the middle i could have count the lines of the file and just chenge the address.
... (6 Replies)
I have a file in which I clean out a bunch of nonsense text as well as path information.
What I end up with is something like the following:
johnson.........................................................933
Where the periods represent the whitespace
The file comes out originally with... (2 Replies)
Can anyone help me pls? I want to add a text into the middle of file.
I've writtenthe following script
text to add="$1"
file="$2"
lines=$(wc -l $2)
half_lines=$(expr $lines / 2)
head -$half_lines $2 > temp
echo "text to add" >> temp
((half_lines=$half_lines + 1))
tail -$half_lines $2... (6 Replies)
Hey guys, how do we take a line of text as an argument from a user and then insert it in the middle of a file irrespective of the number of lines in the file. I am trying to do this without SED or AWK. Inserting it in the beginning and at the end is easy, but i am trying to accomplish inserting... (6 Replies)
Hi,
I want to write a script that takes a file and a string as params and adds the string to the middle line of the file. Also, I want to output the results back to the original file passed without using temp files.
I am very much new to UNIX so this is all a little like black magic to me at... (15 Replies)
Hi,
Below is my issue which I desperately need and I want a shell script which can do this job.
1. There are 10 log files in a particular location.
2. open each log file. Goto to the end of the file. From the end go up to find a particular text. From this particular text till the end of... (3 Replies)
Hi
I have a data file 'File2' consisting of 105670 lines. I want to copy and paste 17928 lines from 'File1' to 'File2' but I want to place it in between lines 21 and 17950 of 'File2'. How do I do it in awk?
For example-
File A has 5 lines
X
Y
1 2 3
4 5 6
7 8 9
and File B has
A
b... (1 Reply)
Hi
I have a data file 'File2' consisting of 105670 lines. I want to copy and paste 17928 lines from 'File1' to 'File2' but I want to place it in between lines 21 and 17950 of 'File2'. How do I do it in awk?
For example-
File A has 5 lines
X
Y
1 2 3
4 5 6
7 8 9
and File B has
A
b... (1 Reply)
Discussion started by: ananyob
1 Replies
LEARN ABOUT DEBIAN
wedged
WEDGED(8) System Manager's Manual WEDGED(8)NAME
wedged - HylaFAX modem wedged script
SYNOPSIS
/var/spool/hylafax/bin/wedged devid device
DESCRIPTION
bin/wedged is the command script invoked by the facsimile server when a modem is deemed to be in an irreparable state and requires operator
intervention. This decision is based on the setting of the MaxSetupAttempts configuration parameter described in hylafax-config(5). The
default wedged script sends electronic mail to the FaxMaster alias. The interval at which emails are sent can be configured in the
etc/FaxDispatch file by setting the WEDGED_EMAIL_INTERVAL variable to the desired number of minutes (emails will be sent no more than every
WEDGED_EMAIL_INTERVAL minutes, until the wedged condition persists). If the variable WEDGED_DISABLE_FAXGETTY is set in etc/FaxDispatch
then the script will attempt to disable any faxgetty processes spawned by the init(8) process for the problematic modem. In addition the
faxq(8) process automatically disables use of the modem for servicing outbound jobs.
The devid argument is the identifier derived from the name of the modem's device file by substituting ``_'' characters for ``/'' charac-
ters; e.g. term_10 for /dev/term/10. The device argument is the name of the character special device associated with the modem.
If there exists an executable file /var/spool/hylafax/etc/resetmodem then that file will be executed upon execution of the wedged script in
an effort to recover the modem.
FILES
/usr/lib/sendmail for delivering mail
SEE ALSO faxq(8), hylafax-config(5)
October 3, 1995 WEDGED(8)