Here is a non-awk script:
running on the first of the files produces:
The edges command is local, it prints lines near the beginning and end of a file; it is not necessary to the solution, just a verification of the content of a sample from the modified file.
Keep in mind that the newline character is counted in wc as a character ... cheers, drl
I have to compare the number of files of two files on a Shell Script:
I tryied with wc and wiith sed but I can not make an integer...
#!/bin/sh
.
.
n = ls -l | wc -l $file1
`echo "Line: "$n". ">>$LOGFILE`
xx = sed -n '$=' $file2
`echo "Line: "$xx". ">>$LOGFILE`
Aways... (4 Replies)
Hello,
I have a text file with n lines in the following format (9 column fields):
Example:
contig00012 149606 G C 49 68 60 18 c$cccccacccccccccc^c
I need to count the number of lower-case and upper-case occurences in column 9, respectively, of the... (3 Replies)
Suppose i have multiple line like below in a file.
ASDFAFAGAHAHAHA
AGAHAHAJGAFAGAH
AHAHAKAHAHAHAKA
I need a bash script to count a character and also Also count the number of character present in each line .
suppose for line 1: A=x, S=y, D=x and so on and total character=15. where x y and z is... (3 Replies)
Hello All,
I got a requirement when I was working with a file. Say the file has unloads of data from a table in the form
1|121|asda|434|thesi|2012|05|24|
1|343|unit|09|best|2012|11|5|
I was put into a scenario where I need the field count in all the lines in that file. It was simply... (6 Replies)
Hi,
I am Beginner in writing shell scripting. I have tried to get the character count using wc command. But it is not giving the correct result.
Could any one please tell me the reason?
$ cat k.ksh
Shell scripting
The character count should be 15 but it is displaying as 16 when i use... (8 Replies)
#!/bin/ksh
read name
read mobile
echo $name | wc -m
Nunberchar=`echo $name |wc -m`
echo $Nunberchar
I write something above, however the char count is wrong, it always count the $ , how to avoid it ? (5 Replies)
Hello,
I do have folders containing having funny strings in their names and one space.
First, I do remove the funny strings and replace the space by an underscore.
find . -name '* *' | while read file;
do
target=`echo "$file" | sed 's/... (2 Replies)
I will appreciate if you help me here in this script in Solaris Enviroment.
Scenario:
i have 2 files :
1) /tmp/TRANSACTIONS_DAILY_20180730.txt:
201807300000000004
201807300000000005
201807300000000006
201807300000000007
201807300000000008
2)... (10 Replies)
Discussion started by: teokon90
10 Replies
LEARN ABOUT MOJAVE
echo
ECHO(1) BSD General Commands Manual ECHO(1)NAME
echo -- write arguments to the standard output
SYNOPSIS
echo [-n] [string ...]
DESCRIPTION
The echo utility writes any specified operands, separated by single blank (' ') characters and followed by a newline ('
') character, to the
standard output.
The following option is available:
-n Do not print the trailing newline character. This may also be achieved by appending 'c' to the end of the string, as is done by iBCS2
compatible systems. Note that this option as well as the effect of 'c' are implementation-defined in IEEE Std 1003.1-2001
(``POSIX.1'') as amended by Cor. 1-2002. Applications aiming for maximum portability are strongly encouraged to use printf(1) to sup-
press the newline character.
Some shells may provide a builtin echo command which is similar or identical to this utility. Most notably, the builtin echo in sh(1) does
not accept the -n option. Consult the builtin(1) manual page.
EXIT STATUS
The echo utility exits 0 on success, and >0 if an error occurs.
SEE ALSO builtin(1), csh(1), printf(1), sh(1)STANDARDS
The echo utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'') as amended by Cor. 1-2002.
BSD April 12, 2003 BSD