Search Results

Search: Posts Made By: zzavilz
1,317
Posted By zzavilz
Read Line is not Updated
Hi,

Is there a way to reflect the recent changes in the file being read when using "while read line" loop? Thanks!

script:
while read line
do
echo $line
cat x.dat|sed 's/2/6/g' >...
1,643
Posted By zzavilz
Filtering values in variable
Hi, is there a faster/simpler way to filter values from the variable1 in variable2?

example:
variable1="A|B|C|E"
variable2="A|B|C|D|F"

output: "A|B|C"

Thanks,
zzavilz
3,112
Posted By zzavilz
Print specific line using a variable
Hi Everyone,

Is there a way I can print specific lines using sed -n '3,3p' file.dat or awk 'FNR==3' file.dat when using variable?

For example, I have this script (get_line.ksh) that accepts...
4,342
Posted By zzavilz
The above code removes the column position 9...
The above code removes the column position 9 instead of just the column position 8...
2,637
Posted By zzavilz
cat sql_output.txt|while read line do ...
cat sql_output.txt|while read line
do
typeset -i charCount=`echo $line|wc -c`
if [[ $charCount -eq 1 ]]; then
echo "no ids to execute"
else
echo "some scipts command"
fi
done
4,342
Posted By zzavilz
Thanks! This code seems to work fine...
Thanks! This code seems to work fine...
4,342
Posted By zzavilz
Sorry, if you find my question somewhat...
Sorry, if you find my question somewhat misleading. But I refer to the position/column no. 8 to be removed in the sample data.

Column 8:
X
Y
X
X

Input file:
ABC 1 1XC
CDA 1 2YC
CCC 1...
4,342
Posted By zzavilz
Remove Specific Column in a File using awk
Hi,

I would like to ask your expertise to remove specific column no. 8 in the below file using but I don't have an idea on how to simply do this using awk command. Appreciate your help in...
1,494
Posted By zzavilz
wow!! this works like a charm man. thanks a lot...
wow!! this works like a charm man. thanks a lot for this it really helped me a lot.

---------- Post updated at 03:14 AM ---------- Previous update was at 02:19 AM ----------



Sorry another...
858
Posted By zzavilz
What the script does is to set/export necessary...
What the script does is to set/export necessary environment and library variables in the server for reference.
2,755
Posted By zzavilz
please try: cat file |tr "\n" " " Please...
please try:
cat file |tr "\n" " "

Please use code tags (https://www.unix.com/how-post-unix-linux-forums/167686-forum-video-tutorial-how-use-code-tags.html) next time for your code and data.
1,494
Posted By zzavilz
Deleting Multiple Lines in a File1 using critera found from File 2
Hi Everyone!

I would like ask if there's a better way I can delete multiple lines in a file1 by collecting all criteria from file2.

file1:
a
b
c
d
e
f


file2:
a
e
f

The...
7,986
Posted By zzavilz
Thanks a lot for all your response. Yes, I...
Thanks a lot for all your response. Yes, I created the code under linux environment which is using a default shell of ksh93. However, I tried to run the script in AIX server (where I am not allowed...
7,986
Posted By zzavilz
Thanks scrutinizer and hergp! Actually this...
Thanks scrutinizer and hergp!

Actually this is the code I have. Here, I am using two files. First is the cluster_file.list and item_sales.dat.

The script will parse the cluster_file.list and...
7,986
Posted By zzavilz
Thanks you for your response Scrutinizer! ...
Thanks you for your response Scrutinizer!

But is there any other way I can achieve to have a variable with 3 decimal places even without using the ksh93?
7,986
Posted By zzavilz
Help when using Typeset in AIX Korn Shell
Guys, please help! I am currently using an AIX server however whenever I tried to use the typeset -F3, the variable is resulting with a "#".

In the given example below, I declared x to be a...
Showing results 1 to 16 of 16

 
All times are GMT -4. The time now is 12:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy