Somehow I was looking for similar kind of stuff.
Can anyone assist me how to skip any headers for that text file while adding any special character in-between the columns ???
Thanks a lot.
I think I'm somehow messing around my requirement
let me put it in some other way
I have a script which will prompt user for entering the values and then
each values will be written in another file with fixed starting positions.
let say
I mean I have fixed length of column and eeach parameter should be fitted in that length . it's for proper alignment.
I posted in this post as there could be some link to my requirement and existing one.
---------- Post updated at 09:03 AM ---------- Previous update was at 08:29 AM ----------
Kindly ignore this question .
As the rule states not to post other question inside a question even though they might look similar or behave similar.
So I will be creating a new one, respecting the rule and regulations.
Hijacking a thread of one of your counterparts is not very nice...even if there are similitudes in the demand...
You are to be owner of your own thread, nothing stopping you to add a links to the almost similar question, its ours to then explain the differences...
This is your new thread since I moved out the posts... I let you change the title
But what exactly I was looking for is a dynamic one which will substact the length of column specified to the length of character and fill the unwanted one with the spaces and do the same for all the parameters anf go on. Anyway It's look like much complicated . I will do the one which I already had and you suggested.
In this way you need to count the string postions but above way , you don't have to worry specify the length of each columns and then enter the values and script will automatically populate according to the position and reformat your columns in a nice way.
Hello!
I am able to do this in bash, using:
echo -ne HELLO > file.txt
and then, 'HELLO' is written into file.txt without the newline character to be added in the end of the file.
How is this possible to be done using sh instead of bash?
If I try something similar is SH, then inside... (3 Replies)
Dear Sir,
I am having text file with no delimiter like below
RAGAV S S 12358 SALES EXECUTIVE 25000
RAJU R B 64253 SALES EXECUTIVE 28000
RUKMAN S 32588 SALES EXECUTIVE 40000
NARGUND S S 12356 ... (3 Replies)
HI all
i have this script :
#!/bin/bash
sort /usr/tmp/"REPORT"$1 -o \
/usr/tmp/"SREPORT"$1 -k 1,7 -S 150
end of script
now i'm doing this command :
ls -lsgt *REPORT*
4 -rw-r--r-- 300 Sep 16 REPORT54784
4 -rw-r--r-- 301 Sep 16 SREPORT54784
as you can see the sorted file... (5 Replies)
hello all
i request you to give the solution for the following problem..
I want read the text file.and print the contents character by character..like if the text file contains google means..i want to print
g
go
goo
goog
googl
google
like this Using unix Shell scripting...
without using... (1 Reply)
Hello,
I after some assistance please. Below is a file I need to read and for each line write an output.
My input file looks like this
2 20008 2003-08-26
2 20032 2003-08-26
2 20041 2003-08-26
2 20037 2003-08-26
2 20050 2003-08-26
6 ... (6 Replies)
I am attempting to insert multiple lines of text into a specific place in a text file based on the lines above or below it.
For example, Here is a portion of a zone file.
IN NS ns1.domain.tld.
IN NS ns2.domain.tld.
IN ... (2 Replies)
Hi All
I am making a script in which.I have a problem i try to discribe.
File1 content need to be append in file 2 but such as if content already exist then dont add.
File1 IS Like this
myname
yourname
hername
hisname
File2
%AddNameHere myname yourname hername hisname (3 Replies)
Im writing a KSH script to read a simple text file and add a delimiter. Ive written the following script but it runs very slow. I initially used the cut command to substring the input record then switched to this version using awk to substring... both run too slow. Any ideas how to make this more... (2 Replies)
Hi,
I wanted to add specific text to each row in a text file containing three rows. Example:
0 8 7 6 5 5
7 8 9 0 7 9
7 8 9 0 1 2
And I want to add a 21 at the beginning of the first row, and blank spaces at the beginning of the second two rows. To get this:
21 0 8 7 6 5 5
7 8... (4 Replies)