10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I m new to shell scripting. I did some research and understand that unix treats while and other loops as new shell and hence the variable loose its value outside of the loop.
I found solution for integer variable but in mycase this is a string variable.
here variable loc is a... (6 Replies)
Discussion started by: knowyrtech
6 Replies
2. Shell Programming and Scripting
There's an input file(input.txt) which has the following details :
CBA
BA
<Please note the second record has a LEADING WHITESPACE which is VALID>
I am using the following code to read the content of the said file line by line:
while read p ; do
echo "$p"
done < input.txt
This is the... (1 Reply)
Discussion started by: kumarjt
1 Replies
3. Shell Programming and Scripting
How to catch a two word keyword which may contain a new line(may include spaces or tab) in it.
for example there is a file a.txt.
$more a.txt
create view
as
(select from
.........
..........
( select
....
(
select
......
..
select only no (((
number
( select
end (12 Replies)
Discussion started by: neelmani
12 Replies
4. Shell Programming and Scripting
Hello,
I have a script that "validates" a ZIP file that look like this
AAA_20120801.zip =>
x~back end~20120801.TXT
y~time in~20120801.TXT
z~heat_chamber~20120801.TXT
AAA_20120801.ctlMy task is to compare its contents (i.e the list of files contained inside) with the control file that is... (2 Replies)
Discussion started by: alan
2 Replies
5. UNIX for Dummies Questions & Answers
I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL.
I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies
6. Shell Programming and Scripting
Hello.
I'm trying to add multiple numbers with varying length and with leading zeroes in it. However, I'm getting the sum (totalHashAccountNumber) without the leading zeroes in it. How do I retain the leading zeroes?
Please pardon the lengthy code.. I'm getting the hash account number from 2... (2 Replies)
Discussion started by: udelalv
2 Replies
7. Ubuntu
What last line mode command allows me to remove extra spaces in between words in a text? (1 Reply)
Discussion started by: rabeel
1 Replies
8. Shell Programming and Scripting
Retaining Spaces within a word
--------------------------------------------------------------------------------
Hi Experts,
I have a 2 GB flat file which have unicode field, some of them are blanks and its size is 4000 character. In the existing system SED command removes the spaces.... (7 Replies)
Discussion started by: RcR
7 Replies
9. UNIX for Dummies Questions & Answers
suppose a line has one word
ex:
unix
how to delete space around that word? (8 Replies)
Discussion started by: sachin.gangadha
8 Replies
10. Shell Programming and Scripting
I need to merge data from more than one file and I am using
while read line_record
do
field1=`echo $line_record | awk -F "," '{ print $1 }'`
echo $line_record >> $outFile
if
then
while read new_linerec
do
echo $new_linerec... (3 Replies)
Discussion started by: skrakesh
3 Replies