Hello,
I am getting few text files with no EOF ( or end-of-line ) which i need to fix using a command so that i can include it in a script. Now i'm fixing this issue by opening the file in "vi" editor and adding last line.
e.g.,
server1#wc -l temp.txt
9 temp.txt
server1#cat ... (6 Replies)
I have a file something like:
a     b c    d
sdfsdf    f f   f
f   fffff
dfdf
Now when i read it as
while read line
do
echo $line
done< file
I get the o/p as
a b c d
sdfsdf f f f
f fffff
dfdf (5 Replies)
Hi,
I am reading data from file and storing it in a multiline variable. Every line is seperated with "\n" character.
globalstrval="${globalstrval}""${line}""\n"
If the value of globalstrval is like:
1234
ABCD
EFGH
WXYZ
....
If I do,
YLvar=`echo $globalstrval | grep "ABC"`
then... (1 Reply)
Hi,
This is the script and the error I am receiving
Can anyone please suggest ?
For the exmaple below assume we are using vg01
#!/bin/ksh
echo "##### Max Mount Count Fixer #####"
echo "Please insert Volume Group name to check"
read VG
lvs |grep $VG | awk {'print $1'} > /tmp/audit.log
... (2 Replies)
Hi ,
I am doing some enhancements in an existing shell script. There it used the awk command in a function as below :
float_expr() {
IFS=" " command eval 'awk "
BEGIN {
result = $*
print result
exit(result == 0)
}"'
}
It calls the function float_expr to evaluate two values ,... (1 Reply)
Hi,
I have a major problem in my source files. I have around 10 source files(around 20 GB).In one of the source files I am getting the broken line issue.My source files needs to be like this
Sr.No~Ref.No~Address~Acc.No
1~ABC345~No.2/110~456474
2~ABC786~4w/54~458695
... (4 Replies)
Heyas
I'm trying to read/display a file its content and put borders around it (tui-cat / tui-cat -t(ypwriter).
The typewriter-part is a 'bonus' but still has its own flaws, but thats for later.
So in some way, i'm trying to rewrite cat using bash and other commands.
But sadly it fails on... (2 Replies)
Hi All- we have performance issue in unix to read line by line.
I am looking at processing all the records.
description: Our script will read data from a flat file, it will pickup first four character and based on the value it will set up variables accordingly and appended the final output to... (11 Replies)
All- We have a performance issue in reading a file line by line. Please find attached scripts for the same. Currently it is taking some 45 min to parse "512444" lines.
Could you please have a look at it and provide any suggestions to improve the performance.
Thanks,
Balu
... (12 Replies)
I am trying to read the below file line by line for the below operation
i) extract the directory alone and assign it one variable
ii) extract the permission available in the line and add comma between the permissions and assign to another variable
iii) Finally apply setfacl logic as shown in... (3 Replies)