Hi all,
Could you please let me know how to return back the value calculated from a shell script to the main script from where its called from.
shell: KSH
example: i have two shell scripts a.sh and b.sh.
i am calling b.sh from a.sh and in b.sh suppose i calculate the word count and other calculations, How can i pass this value calculated from this b.sh script back to a.sh
example code a
Hi, I was hoping that someone could help me. I have a problem that i am trying to work on and it requires me to change text within multiple files using sed. I use the program to change an occurance of a word throughout different files that are being tested.
I had a command which would work through a text file, count all the occurrences of the words and print it out like this:
remy@box $˜ magic-command-i-forgot | with grep | and awk | sort ./textfile.txt
66: the
54: and
32: I
16: unix
12: bash
5: internet
3: sh
1: GNU/Linux
So it does not search line-by-line, but word by word, and it does it for all the words, not just for 1 word.
While the Writer's Tools extension for OpenOffice.org is developed and maintained by your truly includes the Visual Word Count tool, it does have one serious drawback: it uses a modal window, i.e., you can't do anything until you close the Visual Word Count window. Fortunately, there is an alternative solution that solves that problem.
I am new to shell script. I have two perl scripts for text processing based on two different input files.I would like to have one shell script that run based on conditions.
if(input file) matches word /extraction_reversed/ run perlscript1.pl otherwise run perlscript2.pl.
Shell script to compile in terminal
sh run.sh inputfile > outputfile
hi,i am using ubuntu and generally use VI editor to write shell scripts. i am required to write a shell script to copy the text of one file(a text file) into another file.While the script executes, the shell shall ask the user to input the source filename and destination filename (both these files have been initially created by using "cat" command in the terminal).
I am trying to count the occurrences of ALL words in a file. However, I want to exclude certain words: short words (i.e. <3 chars), and words contained in an blacklist file. There is also a desire to count words that are capitalized (e.g. proper names). I am not 100% sure where the line on capitalization is; i.e. do we count the first word of a sentence differently?
I am trying to count number of record in a file and then append a trailer to that file.
Trailer should e in the format as below
T| <count of records>
count of records ---> this count should be one less than the actual count obtained, as the file will have a header.
Text utilities
Text Analyzer is a multi-purpose suite of tools for various text operations.
- Escape/Unescape URL's, URI's, & XML
- Encode/decode Base64
- Adjust cases to/from UPPERCASE, lowercase, sWITCH cASE, Title Case, First letter of sentence
- Trim leading and trailing spaces
- Convert String to hex and vice versa
- Search and replace feature
- Text statistics which include word