Am getting the below output but need the count of records to be displayed in same line but currently count alone moves to next line. Please let me know how we can still keep the count in the same line.
######code #####
######code #####
Current Output:
Desired Output:
Moderator's Comments:
Please use CODE tags as required by forum rules!
Last edited by RudiC; 02-05-2018 at 12:41 PM..
Reason: Added CODE tags.
Hi,
this might be a basic question...
why is that wc -c counts 1 more per line than what is there.
for example,
> cat dum1.txt
123
12
> wc -c dum1.txt
7 dum1.txt
Thanks,
Sameer. (4 Replies)
I am no Unix administrator...I live in windows land.
I wrote a script to find files of certain names and process them but was later advised to avoid checking sparse files since it would use up a lot of resources and the files I was looking for were not there.
How do I avoid doing the find on... (3 Replies)
I am looking to a solution to the following problem. I have a very large file that looks something like this:
Each group of three numbers on each line are three probabilities that sum to one.
I want to output the maximum for each group of three. So desired output would be:
or... (6 Replies)
I have any XML ouput file(file name TABLE.xml), where the data is loaded in A SINGLE LINE, I need help in writting a ksh shell script which gives me the word counts of word <TABLE-ROW>
This is my input file.
<?xml version="1.0" encoding="UTF-8"?><!--Generated by Ascential Software... (4 Replies)
Hi all,
I want to put a check in my script to check if the same instance is already running and not finished and if not then does not allow it to run! in which part of my script I should put this? and any idea how I should write it? tx (4 Replies)
Hi,
I have a script which has the below line:
ps -ef | grep ${SCRIPT_NAME} | grep ksh | grep -v grep >> /tmp/instance.tmp
When the script is invoked through CRON, I get 2 lines in instance.tmp when actually only one instance is running:
cdrd 17790 17789 0 15:14:01 ? 0:00 /bin/ksh... (8 Replies)
In bash shell, how we can avoid the commands getting recorded in history file.
One way i can think of is :
export HISTSIZE=0
Is there any other way to achieve this?
Thanks (1 Reply)
under past circumstances, id be fine running commands like this:
case 1:
printf '%s\n' "${MASSIVETEXT}" | egrep "i am on the first line"
case 2:
vprintf '%s\n' "${MASSIVETEXT}" | egrep -v "i am on the first line"
This works fine. Bit it calls external utility "egrep" and "printf". ... (5 Replies)
Hi Gurus,
I need to remove duplicate line in file and update TRAILER (last line) record count. the file is comma delimited, field 2 is key to identify duplicated record.
I can use below command to remove duplicated. but don't know how to replace last line 2nd field to new count.
awk -F","... (11 Replies)