Hi this is quite simple i am sure but without using awk or sed i need to add text to the top of a file this is what i have got so far
#!bin/bash
echo "Add text to top of file"
read line
echo $line >> file1
This adds the text to the bottom of the file can some1 please help cheers (7 Replies)
Hi,
I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers.
To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
I having file below o/p
ibapp311dg,,20480,s,,,,,,,,,
test,,20480,s,,,,,,,,,
test,,20480,s,,,,,,,,,
ibapp311dg,,20480,s,,,,,,,,,
I want to to chk unique word line in the first field seperated by , as well as addup corressponding the number in field for each unique word like
ibapp311dg... (8 Replies)
ai,
i have one question about shell script regarding for "expr" function
i have using this command "previous=`expr $previous + 1`" where previous value is 0001, but when the script running, the result appear as
expr 1 + 1 = 2 not 0002. The result i need as expr 0001 + 0001 should be... (2 Replies)
Hi All,
I need to create a script which checks for a particular file for eg.kumar1.txt.
If kumar1.txt is already exist the script should increment the file name as kumar2.txt and so on.
Please Advise.
Thanks & Regards,
Kumar66 (2 Replies)
Hi ,
I have a file which has a line starts with $segment_name and has the below data
source data
$Segment_Name = 123.ABC.123.01.txt
$Segment_Name = 123.ABC.ABC.txt
$Segment_Name = 123.ABC.12A3.txtMy target data should be
$Segment_Name = 123.ABC.123.01.txt
$Segment_Name =... (2 Replies)
Hi All ,
I have a file which contains data(comma separated) in below format :
500,Sourav ,kolkata ,8745775020,700091
505,ram,delhi ,9875645874,600032
510 ,madhu ,mumbai ,5698756430 ,500042
515 ,ramesh ,blore ,8769045601 ,400092
I want to add unique sequence number at the start of each... (7 Replies)
Hi experts,
I am using KSH and I am need to display file with number in front of file names and user can select it by entering the number.
I am trying to use following command to display list with numbers. but I do not know how to capture number and identify what file it is to be used for... (5 Replies)
I have the following code that generates a progress bar and
want to add the current execution time after the percentage
value. The current execution time is stored in the variable `runtm`
I am having a problem on how to add `runtm` in the last `printf`
or after it.
i=0; j=0
... (3 Replies)
Discussion started by: kristinu
3 Replies
LEARN ABOUT SUSE
igawk
IGAWK(1) Utility Commands IGAWK(1)NAME
igawk - gawk with include files
SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ...
igawk [ all gawk options ] [ -- ] program-text file ...
DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1).
AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like
@include getopt.awk
in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path.
OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports.
EXAMPLES
cat << EOF > test.awk
@include getopt.awk
BEGIN {
while (getopt(ARGC, ARGV, "am:q") != -1)
...
}
EOF
igawk -f test.awk
SEE ALSO gawk(1)
Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995.
AUTHOR
Arnold Robbins (arnold@skeeve.com).
Free Software Foundation Nov 3 1999 IGAWK(1)